PDA

View Full Version : I have error :(



STAUFFi
4th September 2012, 20:06
init()
{
level endon("boot");
wait 0.05;
setcvar("time", "");
while(1)
{
if(getcvar("time") != "")
{
if (getcvar("time") == "all")
setcvar("time", "-1");

players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
player = players[i];

iprintlnbold("Server time is" + timeleft + " xD");
if(level.timelimit <= 0)
setcvar("time", "");
}
}
wait 0.05;
}
}


i have all times error ...
guys can you help me ?

kung foo man
4th September 2012, 20:12
hi stauffi, please use
to indent your code. :D

and an error message would be nice also. :>

and we are humans, we like greetings and stuff.

the only problem i see is
iprintlnbold("Server time is" + timeleft + " xD");

timeleft is not defined. so try:
iprintlnbold("Server time is" + level.timeleft + " xD");

STAUFFi
4th September 2012, 20:17
then comming

******* script compile error *******
bad syntax: (file 'maps/mp/gametypes/zom.gsc', line 72)
thread maps\mp\gametypes\_time:init();
*
************************************
********************
ERROR: script compile error
(see console for details)

kung foo man
4th September 2012, 20:21
thread maps\mp\gametypes\_time::init();


you missed a ":".

Killer.Pro
5th September 2012, 05:39
lol i thought it was a huge error that he posted in forum :D

Killer.Pro
5th September 2012, 05:45
You see script compile errors are really easy to fix because in console they tell you where the error is so...


******* script compile error *******
bad syntax: (file 'maps/mp/gametypes/zom.gsc', line 72)
thread maps\mp\gametypes\_time:init();
*
************************************
********************
ERROR: script compile error
(see console for details)

You see there a *
That shows that the error you're getting in right there so you don't have to see any other script or going and checking all the scripts to find the errors...
with /developer you get the details with error so if you don't get a * in console, try /developer . . .