Problem with timer (y_timers) -
Kindred - 25.05.2013
I am trying to make a turf system, but can't seem to get the handle of it. Currently, I've looked over everything and I can't seem to find what's causing it. This is the command that uses the timer, and I also included the timer on the bottom. I am recieving these errors when I compile:
Код:
C:\Users\Steven\Desktop\Imperious Roleplay\gamemodes\wastelandwturf.pwn(9728) : error 012: invalid function call, not a valid address
C:\Users\Steven\Desktop\Imperious Roleplay\gamemodes\wastelandwturf.pwn(9728) : warning 215: expression has no effect
C:\Users\Steven\Desktop\Imperious Roleplay\gamemodes\wastelandwturf.pwn(9728) : error 001: expected token: ";", but found ")"
C:\Users\Steven\Desktop\Imperious Roleplay\gamemodes\wastelandwturf.pwn(9728) : error 029: invalid expression, assumed zero
C:\Users\Steven\Desktop\Imperious Roleplay\gamemodes\wastelandwturf.pwn(9728) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
The errors are all happening on the line where my timer is. It is on the bottom of the script I posted here.
pawn Код:
CMD:startwar(playerid, params[])
{
if(PlayerInfo[playerid][pFamily] >= 1 && PlayerInfo[playerid][pRank] >= 5)
{
new tier;
switch(FamilyInfo[PlayerInfo[playerid][pFamily]][fTier])
{
case 1: tier = 1;
case 2: tier = 2;
case 3: tier = 3;
}
new zoneid = GetPlayerWarZone(playerid);
if(zoneid != -1)
{
if(GetPlayersInZone(zoneid, PlayerInfo[playerid][pFamily]) >= MINIMUMMEMBERS)
{
ZoneAttacker[zoneid] = PlayerInfo[playerid][pFamily];
ZoneAttackTime[zoneid] = 0;
GangZoneFlashForAll(ZoneID[zoneid], 0xADD8E6FF);
repeat WarZoneTimer(zoneid);
}
}
else return SendClientMessageEx(playerid, COLOR_GRAY, "You are not inside a zone!");
}
else return SendClientMessageEx(playerid, COLOR_GRAY, "You are not in a family / You are not rank 5 or above");
return 1;
}
timer WarZoneTimer[1000](zoneid) //THis is where the error is happening
{
return 1;
}
EDIT: I'd also like to mention all of my timers work, and I literally copy & pasted this and changed the name of the timer.
Re: Problem with timer (y_timers) -
Chenko - 25.05.2013
Try not returning 1 at the end of the timer.
Re: Problem with timer (y_timers) -
Kindred - 25.05.2013
Nope, didn't work.
Re: Problem with timer (y_timers) -
Kindred - 25.05.2013
Still looking for assistance.
BUMP
Re: Problem with timer (y_timers) -
Kevin FOx - 25.05.2013
Try this
pawn Код:
timer WarZoneTimer[1000](zoneid);
and remove the
Re: Problem with timer (y_timers) -
Kindred - 25.05.2013
That's not how it works, and I've tried adding a ; at the end of the timer, but that's not how it's suppose to work.
Re: Problem with timer (y_timers) -
Chenko - 25.05.2013
Try updating y_timers and making sure its included properly.
Re: Problem with timer (y_timers) -
Kindred - 25.05.2013
Pretty sure that won't work, I said that all the other timers are working flawlessly.
Re: Problem with timer (y_timers) -
Chenko - 25.05.2013
The code looks fine to me, the only thing I can think of at this point is y_timers isn't included. Are your other timers also made using y_timers?
Re: Problem with timer (y_timers) -
Kindred - 25.05.2013
Yup, all of my timers are y_timers.
Not sure why it isn't working, it's really getting annoying.