Results 1 to 6 of 6

Thread: I have error :(

  1. #1
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts

    I have error :(

    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 ?

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    hi stauffi, please use [code][/code] to indent your code.

    and an error message would be nice also. :>

    and we are humans, we like greetings and stuff.

    the only problem i see is
    Code:
    iprintlnbold("Server time is" + timeleft + " xD");
    timeleft is not defined. so try:
    Code:
    iprintlnbold("Server time is" + level.timeleft + " xD");

  3. #3
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts
    then comming
    Code:
    ******* 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)

  4. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Code:
    thread maps\mp\gametypes\_time::init();

    you missed a ":".

  5. The Following User Says Thank You to kung foo man For This Useful Post:

    Killer.Pro (5th September 2012)

  6. #5
    Corporal Killer.Pro's Avatar
    Join Date
    Jul 2012
    Location
    belgium
    Posts
    274
    Thanks
    102
    Thanked 213 Times in 141 Posts
    lol i thought it was a huge error that he posted in forum

  7. #6
    Corporal Killer.Pro's Avatar
    Join Date
    Jul 2012
    Location
    belgium
    Posts
    274
    Thanks
    102
    Thanked 213 Times in 141 Posts
    You see script compile errors are really easy to fix because in console they tell you where the error is so...

    Code:
    ******* 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 . . .

  8. The Following User Says Thank You to Killer.Pro For This Useful Post:

    kung foo man (5th September 2012)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •