Scripting error =/

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

Moderator: Core Staff

Post Reply
User avatar
Tehdisciple
CJ Wannabe
CJ Wannabe
Posts: 45
Joined: April 16th, 2007, 4:31 pm
Location: Nj

Scripting error =/

Post by Tehdisciple » August 31st, 2007, 4:46 am

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?
Image
Xfire:m00n1
" i just crashed paint -.-" - Disciple

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

Post by Luke » August 31st, 2007, 10:38 am

It's missing a } bracket at the end of the first thread.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

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

Post by Nightmare » August 31st, 2007, 8:37 pm

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);
}
}
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]

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests