debug problem
#2

It's caused because of active_character[playerid].
pawn Код:
new slot = GetFactionSlot(CharacterInfo[playerid][active_character[playerid]][cFaction]);
Let's say, you declared it as:
pawn Код:
new CharacterInfo[MAX_PLAYERS][25][some_enum_here];
You need to check if active_character[playerid] is between 0-24. Change accordingly to the value of the dimension.
pawn Код:
public IsLaw(playerid)
{
    if (0 <= active_character[playerid] < 25)
    {
        new slot = GetFactionSlot(CharacterInfo[playerid][active_character[playerid]][cFaction]);
        if(slot > -1 && FactionInfo[slot][fType] == FAC_TYPE_LAW) return true;
    }
    return false;
}
If IsLaw is not called by a timer or Call Remote/Local Function, then just use stock instead of forward/public.
Reply


Messages In This Thread
debug problem - by Walkie - 01.02.2014, 21:00
Re: debug problem - by Konstantinos - 01.02.2014, 21:45
Re: debug problem - by Walkie - 01.02.2014, 21:51
Re: debug problem - by Konstantinos - 01.02.2014, 22:16
Re: debug problem - by Walkie - 02.02.2014, 06:58
Re: debug problem - by Konstantinos - 02.02.2014, 09:33
Re: debug problem - by Misiur - 02.02.2014, 11:30

Forum Jump:


Users browsing this thread: 1 Guest(s)