There is a sticky that says when asking about errors always post the code. We can't see what the error is unless you post your code. We are not mind readers.
There is a sticky that says when asking about errors always post the code. We can't see what the error is unless you post your code. We are not mind readers.
Well, here it is:
And script is:******script compile error******
bad syntax: (file 'maps/mp/castle.gsc', line 15
}
*
***********************************
main()
{
door1= getent("lol1","targetname");
door2= getent("lol2","targetname");
t=0;
while(1)
{
if(t==10)
{
door1 rotateyaw(90,2);
door2 rotateyaw(-90,2);
door2 waittill("rotatedone");
iPrintInBold("Castle Opened!")
}
t++;
wait 10;
}
}
Missing the ";"Code:iPrintInBold("Castle Opened!")
You do know that once the doors are open, the loop will carry on? The doors will keep rotating their yaw again and again and again. If you only want them to open once, you need to break from the loop once done.Code:main() { door1= getent( "lol1", "targetname" ); door2= getent( "lol2", "targetname" ); t = 0; while( true ) { if( t == 10 ) { door1 rotateyaw( 90, 2 ); door2 rotateyaw( -90, 2 ); door2 waittill( "rotatedone" ); iPrintInBold( "Castle Opened!" ); } t++; wait 10; } }
Last edited by Tally; 7th March 2014 at 20:17.
Just doWaaay less complicated and doesn't involve any loops.Code:main() { door1 = getent( "lol1", "targetname" ); door2 = getent( "lol2", "targetname" ); wait(60 * 10); door1 rotateyaw( 90, 2 ); door2 rotateyaw( -90, 2 ); door2 waittill( "rotatedone" ); iPrintInBold( "Castle Opened!" ); }
Yuri, it says that the line 10, which is the:That the iPrintInBold is invalid, withPHP Code:
main()
{
door1 = getent( "lol1", "targetname" );
door2 = getent( "lol2", "targetname" );
wait(60 * 10);
door1 rotateyaw( 90, 2 );
door2 rotateyaw( -90, 2 );
door2 waittill( "rotatedone" );
iPrintInBold( "Castle Opened!" );
}
PHP Code:
*********************
script compile error
maps/mp/castle.gsc, line 10
*
*********************
But i deleted it, and it works then so
But this does not open my doors at all. i can post some screenshots if you want
See the error is someone posted it with an I instead of L "iPrintlnBold" try that:It was upper case i and not L lower in that place.Code:iprintLnbold( "castle opened!" );
Okey. But I'm getting help from Roman, Yuri