Szerző Téma: Mod hiba  (Megtekintve 676 alkalommal)

Mod hiba
« Dátum: 2015. Január 15. - 17:05:54 »
0 Show voters
Hello. Készítek éppen egy Zombie modot és azt megcsináltam hogy kíirja hogy pl.: Automatic zombie select: 20 second.
 

new counter = 20;
forward rtime(playerid);
public rtime(playerid)
{
new timer = SetTimerEx(\"test\", 1000, true, \"d\", playerid);// ez az a timer
SetTimer(\"RandomZombi\", 20000, false);
GameTextForAll(\"~h~9 ~y~perc múlva vége a vadászatnak\",5000,1);
}
forward test(playerid);
public test(playerid)
{
if(counter == 0)
{
KillTimer(timer);
}
    counter--;
    new string[24];
    format(string, sizeof(string), \"Automatic zombie select: %d\", counter);
    return GameTextForPlayer(playerid, string, 1000, 4);
}

 
De amikor létrehozok egy Timert és elmentem akkor ezt írja:  C:\\Users\\Admin\\Desktop\\samp\\gamemodes\\zombie.pwn(239) : warning 204: symbol is assigned a value that is never used: \"timer\"
és ezt: C:\\Users\\Admin\\Desktop\\samp\\gamemodes\\zombie.pwn(497) : error 017: undefined symbol \"timer\"
Miért van ez???
« Utoljára szerkesztve: 2015. Január 15. - 20:20:39 írta RusH. »

Mod hiba
« Válasz #1 Dátum: 2015. Január 15. - 18:18:08 »
0 Show voters
error 017: undefined symbol \"timer\"[/quote]
Nincs definálva a timer

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Mod hiba
« Válasz #2 Dátum: 2015. Január 15. - 20:17:42 »
0 Show voters
new timer helyett timer elég és a new timer;-t meg rakd gm/fs elejére

Mod hiba
« Válasz #3 Dátum: 2015. Január 16. - 19:42:17 »
0 Show voters
Idézetet írta: danieldeak70 date=1421337954\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"52212\" data-ipsquote-contentclass=\"forums_Topic
Még mindig ezt írja:  C:\\Users\\Admin\\Desktop\\samp\\gamemodes\\zombie.pwn(239) : warning 204: symbol is assigned a value that is never used: \"timer\"
Miért van ez???
 

Mod hiba
« Válasz #4 Dátum: 2015. Január 16. - 20:19:59 »
0 Show voters

new counter = 20, timer;
forward rtime(playerid);
public rtime(playerid)
{
timer = SetTimerEx(\"test\", 1000, true, \"d\", playerid);
SetTimer(\"RandomZombi\", 20000, false);
GameTextForAll(\"~h~9 ~y~perc múlva vége a vadászatnak\",5000,1);
}
forward test(playerid);
public test(playerid)
{
        if(counter == 0)
        {
        KillTimer(timer);
        }
    counter--;
    new string[24];
    format(string, sizeof(string), \"Automatic zombie select: %d\", counter);
    return GameTextForPlayer(playerid, string, 1000, 4);
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal