[Tutorial] New Timer Bug
#6

Quote:
Originally Posted by Quickie
Посмотреть сообщение
its not a bug
its just a coding mistakes
you can fix that with this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/Timer", true))
    {
        if(Connect[playerid])
        {
            KillTimer(Connect[playerid]);
            Connect[playerid]=0;
        }
        Connect[playerid] = SetTimerEx("Test", 1000, true, "i", playerid);
        return 1;
    }
    if(!strcmp(cmdtext, "/Killer", true))
    {
        if(Connect[playerid])
        {
            KillTimer(Connect[playerid]);
            Connect[playerid]=0;
        }
        return 1;
    }
    return 0;
}
That is true:

Quote:

It is a programming mistake; you can call it a bug, error, whatever; I call it a bug
It can be fixed in both ways, I prefer the simplest one

pawn Код:
KillTimer(Connect[playerid]);
Connect[playerid] = SetTimerEx("Test", 1000, true, "i", playerid);
But that code is good. Also, thanks for feedback, +REP
Reply


Messages In This Thread
New Timer Bug - by Ygzeb - 22.11.2014, 00:24
Re: New Timer Bug - by Abagail - 22.11.2014, 00:56
Re: New Timer Bug - by JaKe Elite - 22.11.2014, 00:59
Answer - by Ygzeb - 22.11.2014, 01:45
Re: New Timer Bug - by Quickie - 22.11.2014, 04:06
Answer - by Ygzeb - 22.11.2014, 04:40
Re: New Timer Bug - by Emmet_ - 22.11.2014, 05:31
Answer - by Ygzeb - 22.11.2014, 06:21

Forum Jump:


Users browsing this thread: 2 Guest(s)