KillTimer [rep++]
#1

Please help me how to fix this error

(11234) : error 076: syntax error in the expression, or invalid function call

Line 11234: KillTimer(RentBikeTimer);
Reply
#2

Post your RentBikeTimer routine
Reply
#3

pawn Код:
if(IsARentBike(vehicleid))
{
if(Pederche[playerid] == 1)
{
KillTimer(RentBikeTimer);
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Poveke ne rentate Motor/Tocak");
Pederche[playerid] == 0;
}
}
pawn Код:
forward RentBikeTimer(playerid);
public RentBikeTimer(playerid)
{
GivePlayerMoney(playerid, -50)
SetTimer("RentBikeTimer",60000,0);
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Plativte 50 dolari za rent za tocak/motor");
Pederche[playerid] = 1;
}
Reply
#4

HELP !!!!!!!!
Reply
#5

A timer ID is returned by SetTimer, you us this ID to kill it.

pawn Код:
new timerid = SetTimer("blahhblahh", 6000, false);
Then
pawn Код:
KillTimer(timerid);
Even though you killed a fairy.
Reply
#6

pawn Код:
error 017: undefined symbol "rentbiketimer"
pawn Код:
new rentbiketimer = SetTimer("RentBikeTimer",60000,0);
Reply
#7

rentbiketimer should be as a global variable, not as local.
Reply
#8

My fault for not making it clear enough.

Create a global var.

pawn Код:
new rentbiketimer;
pawn Код:
rentbiketimer = SetTimer("RentBikeTimer",60000,0);
EDIT: Too slow.
Reply
#9

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)