Page 1 of 1

Script runtime error

Posted: March 15th, 2006, 10:26 pm
by Derick
Hi I have a script runtime error here is my syntax :

Code: Select all

main()
{
thread platformb();
}

platformb()
{
platformb = getent ("platformb","targetname");
trigger = getent ("trigger_pfb","targetname");
while(1)
{
main()
{
thread platformb();
}

platformb()
{
platformb = getent ("platformb","targetname");
trigger = getent ("trigger_pfb","targetname");
while(1)
{
trigger waittill ("trigger");
platformb moveZ (144,1,0.5,0.5);
platformb waittill ("movedone");
wait(3);
platformb moveZ (-144,1,0.5,0.5);
platformb waittill ("movedone");
}
}
platformb moveZ (144,1,0.5,0.5);
platformb waittill ("movedone");
wait(3);
platformb moveZ (-144,1,0.5,0.5);
platformb waittill ("movedone");
}
}
The problem is the "trigger waittill ("trigger");"
Help please :D

Posted: March 15th, 2006, 10:27 pm
by Pedsdude
Please post the exact error it comes up with. In order to see the full error type "/developer 1" in console, try and load your map, then check the console.

Why have you got everything twice?

Try this:

Code: Select all

main()
{
thread platformb();
}

platformb()
{
platformb = getent ("platformb","targetname");
trigger = getent ("trigger_pfb","targetname");
while(1)
{
trigger waittill ("trigger");
platformb moveZ (144,1,0.5,0.5);
platformb waittill ("movedone");
wait(3);
platformb moveZ (-144,1,0.5,0.5);
platformb waittill ("movedone");
}
} 

Posted: March 15th, 2006, 10:38 pm
by Pedsdude
Problem solved (for now) - I spoke to him on xfire and it would appear he didn't give the trigger a targetname.

Topic also moved to Mapping section instead of Support section.

Posted: March 15th, 2006, 10:53 pm
by Nightmare
also your code was copied and pasted multiple times

Ex:
main()
{
thread platformb();
}

platformb()
{
platformb = getent ("platformb","targetname");
trigger = getent ("trigger_pfb","targetname");
while(1)
{
main()
{
thread platformb();
}

platformb()
{
platformb = getent ("platformb","targetname");
trigger = getent ("trigger_pfb","targetname");
while(1)
You pasted that twice, same thing with the movement of the platform

Posted: March 15th, 2006, 11:46 pm
by Drofder2004
Solved?

/Locked?

Posted: March 16th, 2006, 12:15 am
by Nightmare
yes, please do :D

Posted: March 16th, 2006, 12:37 am
by Luke
I assume Derick understands why he had this problem? I think we should wait for his response first, incase he runs into a similar problem, and lock when thats clear.

Posted: March 16th, 2006, 10:26 pm
by Derick
My platform working well..
The problem was the targetname :oops:
But I don't understand why all is there twice..
Maybe copy-paste error..
well thanks to all.. :lol: