Page 1 of 1

Scripting error =/

Posted: August 31st, 2007, 4:46 am
by Tehdisciple
I am trying to do a script test map, but it says bad syntax line 19 here is the script:

Code: Select all

main()
{
thread ancientshrine_plat1();
thread ancientshrine_tele1();
}

ancientshrine_plat1()
{
platform = getent ("ancientshrine_plat1","targetname");
while(1)
{
platform moveZ (208,2,0.5,0.5);
wait(5);
platform moveZ (-208,2,0.5,0.5);
platform waittill ("movedone");
}

ancientshrine_tele1()
{
trigger = getent ("teleporter", "targetname");
while(1)
{
trigger waittill ("trigger",user);
user iprintlnbold ("Hello Xeno :D");
wait(1);
user setOrigin( (-136, 384, 512) );
wait(1);
}
}
Can any1 help me?

Posted: August 31st, 2007, 10:38 am
by Luke
It's missing a } bracket at the end of the first thread.

Posted: August 31st, 2007, 8:37 pm
by Nightmare
Here use this:

Code: Select all

main()
{
thread ancientshrine_plat1();
thread ancientshrine_tele1();
}

ancientshrine_plat1()
{
platform = getent ("ancientshrine_plat1","targetname");
while(1)
{
platform moveZ (208,2,0.5,0.5);
platform waittill ("movedone");
wait(5);
platform moveZ (-208,2,0.5,0.5);
platform waittill ("movedone");
}
}

ancientshrine_tele1()
{
trigger = getent ("teleporter", "targetname");
while(1)
{
trigger waittill ("trigger",user);
user iprintlnbold ("Hello Xeno :D");
wait(1);
user setOrigin( (-136, 384, 512) );
wait(1);
}
}