#1

Hello
I get this error:
pawn Код:
error 076: syntax error in the expression, or invalid function call
In this code:
pawn Код:
forward CountDown();
public CountDown() {
     CountDownVar--;
     new str[128];
     if(CountDownVar == 0) {
        for(new i=0;i<75;i++) {
            GameTextForAll("~g~Go!",1500,6);
            TogglePlayerControllable(i,1);
            KillTimer(CountDown); } } //Line of error
     else {
        format(str, sizeof(str), "~r~%d",CountDownVar);
        GameTextForAll(str,1001,6); }
        PlayerPlaySoundToAll(1056);
     return 1;
}
Please help
Thanks,Nuriel
Reply
#2

hm.. i have replicated your code and got the same error, however, commenting out
pawn Код:
KillTimer(CountDown);
did get rid of the error. post the timer setup part..
Reply
#3

Quote:
Originally Posted by [Diablo]
Посмотреть сообщение
hm.. i have replicated your code and got the same error, however, commenting out
pawn Код:
KillTimer(CountDown);
did get rid of the error. post the timer setup part..
What do you mean?
pawn Код:
SetTimer("CountDown",1000, false);
this?
Reply
#4

Quote:
Originally Posted by nuriel8833
Посмотреть сообщение
What do you mean?
pawn Код:
SetTimer("CountDown",1000, false);
this?
KillTimer() takes timer object as it's argument, not callback.

See this.
Reply
#5

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
KillTimer() takes timer object as it's argument, not callback.

See this.
Fixed,thanks a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)