Script runtime error

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Locked
Derick
CJ Wannabe
CJ Wannabe
Posts: 16
Joined: February 2nd, 2006, 10:20 pm

Script runtime error

Post by Derick » March 15th, 2006, 10:26 pm

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
Image

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » March 15th, 2006, 10:27 pm

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");
}
} 
Image
Image

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » March 15th, 2006, 10:38 pm

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.
Image
Image

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » March 15th, 2006, 10:53 pm

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
Last edited by Nightmare on March 16th, 2006, 12:17 am, edited 2 times in total.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » March 15th, 2006, 11:46 pm

Solved?

/Locked?
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » March 16th, 2006, 12:15 am

yes, please do :D
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » March 16th, 2006, 12:37 am

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.

Derick
CJ Wannabe
CJ Wannabe
Posts: 16
Joined: February 2nd, 2006, 10:20 pm

Post by Derick » March 16th, 2006, 10:26 pm

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:
Image

Locked

Who is online

Users browsing this forum: No registered users and 0 guests