Page 1 of 1

compie error

Posted: August 10th, 2006, 12:12 am
by creator

Code: Select all

******* script compile error *******
bad syntax: (file 'maps\mp\roltrap1.gsc', line 30)
{

*
************************************
********************
can some 1 help me with this problem
i keep trying to fix but nothing helps :?

Code: Select all

main()
{
thread roltrap1 ();
thread roltrap2 ();
thread roltrap3 ();
thread roltrap4 ();
thread roltrap5 ();
thread roltrap6 ();
thread roltrap7 ();
thread roltrap8 ();

}

roltrap1 ()
{
trap1 = getent ("roltrap1" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap1 moveto  ((100,200,300), 7); 
trap1 waittill ("movedone");
wait (4);
trap1 moveto ((120,220,320), 7);  //// ure brush will move to them co-ordinates in one second
trap1 waittill ("movedone");
wait (2);


roltrap2 ()
{
trap2 = getent ("roltrap2" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap2 moveto  ((100,200,300), 7);
trap2 waittill ("movedone");
wait (4);
trap2 moveto ((120,220,320), 7);
trap2 waittill ("movedone");
wait (2);


roltrap3 ()
{
trap3 = getent ("roltrap3" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap3 moveto  ((100,200,300), 7);
trap3 waittill ("movedone");
wait (4);
trap3 moveto ((120,220,320), 7);
trap3 waittill ("movedone");
wait (2);


roltrap4 ()
{
trap4 = getent ("roltrap4" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap4 moveto  ((100,200,300), 7);
trap4 waittill ("movedone");
wait (4);
trap4 moveto ((120,220,320), 7);
trap4 waittill ("movedone");
wait (2);

roltrap5 ()
{
trap5 = getent ("roltrap5" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap5 moveto  ((100,200,300), 7);
trap5 waittill ("movedone");
wait (4);
trap5 moveto ((120,220,320), 7);
trap5 waittill ("movedone");
wait (2);

roltrap6 ()
{
trap6 = getent ("roltrap6" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap6 moveto  ((100,200,300), 7);
trap6 waittill ("movedone");
wait (4);
trap6 moveto ((120,220,320), 7);
trap6 waittill ("movedone");
wait (2);

roltrap7 ()
{
trap7 = getent ("roltrap7" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap7 moveto  ((100,200,300), 7);
trap7 waittill ("movedone");
wait (4);
trap7 moveto ((120,220,320), 7);
trap7 waittill ("movedone");
wait (2);

roltrap8 ()
{
trap8 = getent ("roltrap8" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap8 moveto  ((100,200,300), 7);
trap8 waittill ("movedone");
wait (4);
trap8 moveto ((120,220,320), 7);
trap8 waittill ("movedone");
wait (2);
}
}

Posted: August 10th, 2006, 12:16 am
by creator
o i see
but thats over 30 lines?

Code: Select all

******* script compile error *******
bad syntax: (file 'maps\mp\roltrap1.gsc', line 30)
{

*
************************************
********************
still got the error its not that

Posted: August 10th, 2006, 12:17 am
by creator
uhm? what u mean?
and i still got the same error

Posted: August 10th, 2006, 12:25 am
by creator

Code: Select all

main()
{
thread roltrap1 ();
thread roltrap2 ();
thread roltrap3 ();
thread roltrap4 ();
thread roltrap5 ();
thread roltrap6 ();
thread roltrap7 ();
thread roltrap8 ();

}

roltrap1 ()
{
trap1 = getent ("roltrap1" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap1 moveto  ((100,200,300), 7); 
trap1 waittill ("movedone");
wait (4);
trap1 moveto ((120,220,320), 7);  //// ure brush will move to them co-ordinates in one second
trap1 waittill ("movedone");
wait (2);

}

roltrap2 ()
{
trap2 = getent ("roltrap2" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap2 moveto  ((100,200,300), 7);
trap2 waittill ("movedone");
wait (4);
trap2 moveto ((120,220,320), 7);
trap2 waittill ("movedone");
wait (2);

}

roltrap3 ()
{
trap3 = getent ("roltrap3" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap3 moveto  ((100,200,300), 7);
trap3 waittill ("movedone");
wait (4);
trap3 moveto ((120,220,320), 7);
trap3 waittill ("movedone");
wait (2);

}

roltrap4 ()
{
trap4 = getent ("roltrap4" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap4 moveto  ((100,200,300), 7);
trap4 waittill ("movedone");
wait (4);
trap4 moveto ((120,220,320), 7);
trap4 waittill ("movedone");
wait (2);

}


roltrap5 ()
{
trap5 = getent ("roltrap5" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap5 moveto  ((100,200,300), 7);
trap5 waittill ("movedone");
wait (4);
trap5 moveto ((120,220,320), 7);
trap5 waittill ("movedone");
wait (2);

}

roltrap6 ()
{
trap6 = getent ("roltrap6" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap6 moveto  ((100,200,300), 7);
trap6 waittill ("movedone");
wait (4);
trap6 moveto ((120,220,320), 7);
trap6 waittill ("movedone");
wait (2);

}

roltrap7 ()
{
trap7 = getent ("roltrap7" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap7 moveto  ((100,200,300), 7);
trap7 waittill ("movedone");
wait (4);
trap7 moveto ((120,220,320), 7);
trap7 waittill ("movedone");
wait (2);

}

roltrap8 ()
{
trap8 = getent ("roltrap8" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap8 moveto  ((100,200,300), 7);
trap8 waittill ("movedone");
wait (4);
trap8 moveto ((120,220,320), 7);
trap8 waittill ("movedone");
wait (2);

}
}

Posted: August 10th, 2006, 12:34 am
by creator
that script.. didnt help

Code: Select all

bad syntax: (file 'maps\mp\roltrap1.gsc', line 31)
{

*
************************************
********************

Posted: August 10th, 2006, 1:11 am
by red_gee
You still haven't closed them all
Look at the last thread, and then the second last one

Posted: August 10th, 2006, 1:29 am
by creator
uhm?
they are closed with a }
if not.. can u post it here with the good stuff...
cause im stupid :P

Posted: August 10th, 2006, 1:32 am
by Drofder2004
count your brackets...

You have 17 {'s
And 10 }'s

You are missing 7 }'s

Every bracket you open, you MUST close.

Posted: August 10th, 2006, 1:46 am
by creator

Code: Select all

main()
{
thread roltrap1 ();
thread roltrap2 ();
thread roltrap3 ();
thread roltrap4 ();
thread roltrap5 ();
thread roltrap6 ();
thread roltrap7 ();
thread roltrap8 ();

}

roltrap1 ()
{
trap1 = getent ("roltrap1" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap1 moveto  ((100,200,300), 7);
trap1 waittill ("movedone");
wait (4);
trap1 moveto ((120,220,320), 7);  //// ure brush will move to them co-ordinates in one second
trap1 waittill ("movedone");
wait (2);

}
}

roltrap2 ()
{
trap2 = getent ("roltrap2" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap2 moveto  ((100,200,300), 7);
trap2 waittill ("movedone");
wait (4);
trap2 moveto ((120,220,320), 7);
trap2 waittill ("movedone");
wait (2);

}
}

roltrap3 ()
{
trap3 = getent ("roltrap3" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap3 moveto  ((100,200,300), 7);
trap3 waittill ("movedone");
wait (4);
trap3 moveto ((120,220,320), 7);
trap3 waittill ("movedone");
wait (2);

}
}

roltrap4 ()
{
trap4 = getent ("roltrap4" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap4 moveto  ((100,200,300), 7);
trap4 waittill ("movedone");
wait (4);
trap4 moveto ((120,220,320), 7);
trap4 waittill ("movedone");
wait (2);

}
}

roltrap5 ()
{
trap5 = getent ("roltrap5" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap5 moveto  ((100,200,300), 7);
trap5 waittill ("movedone");
wait (4);
trap5 moveto ((120,220,320), 7);
trap5 waittill ("movedone");
wait (2);

}
}

roltrap6 ()
{
trap6 = getent ("roltrap6" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap6 moveto  ((100,200,300), 7);
trap6 waittill ("movedone");
wait (4);
trap6 moveto ((120,220,320), 7);
trap6 waittill ("movedone");
wait (2);

}
}

roltrap7 ()
{
trap7 = getent ("roltrap7" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap7 moveto  ((100,200,300), 7);
trap7 waittill ("movedone");
wait (4);
trap7 moveto ((120,220,320), 7);
trap7 waittill ("movedone");
wait (2);

}
}

roltrap8 ()
{
trap8 = getent ("roltrap8" , "targetname");
trig = getent ("rol_trig" , "targetname");
while (1)
{
trig waittill ("trigger");
trap8 moveto  ((100,200,300), 7);
trap8 waittill ("movedone");
wait (4);
trap8 moveto ((120,220,320), 7);
trap8 waittill ("movedone");
wait (2);

}
}
that good?

Posted: August 10th, 2006, 1:57 am
by Drofder2004
load up your map and see.

Posted: August 10th, 2006, 2:00 am
by creator
yay :)
thx 8)
:P
/closed?
/problem solved

Posted: August 10th, 2006, 9:13 pm
by Pedsdude
mmmmmmmmmmm compie