Problem with timer (y_timers)
#1

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.
Reply
#2

Try not returning 1 at the end of the timer.
Reply
#3

Nope, didn't work.
Reply
#4

Still looking for assistance.

BUMP
Reply
#5

Try this
pawn Код:
timer WarZoneTimer[1000](zoneid);
and remove the
pawn Код:
{
return 1;
}
Reply
#6

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.
Reply
#7

Try updating y_timers and making sure its included properly.
Reply
#8

Pretty sure that won't work, I said that all the other timers are working flawlessly.
Reply
#9

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?
Reply
#10

Yup, all of my timers are y_timers.

Not sure why it isn't working, it's really getting annoying.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)