saving color with Y_INI + crash detect problem
#1

Hello, i tried to load Int Color using Y INI system.
And when i tried to load the color and set player's color, It set my color to black and show me
something on consol, which it is:
Код:
[05:39:17] [debug] Run time error 4: "Array index out of bounds"
[05:39:17] [debug]  Accessing element at negative index -1
[05:39:17] [debug] AMX backtrace:
[05:39:17] [debug] #0 00045e88 in public SetPlayerClanColor (0x0000000f) from xd.amx
And here is my code:
pawn Код:
#define MAX_CLANS           5
enum clanss
    {
    cName[50],
    cTag[50],
    cColor[10],
    cExist,
    cMembers,
    }
new Clans[MAX_CLANS][clanss];
public SetPlayerClanColor(playerid)
    {
        if(GetPlayerColor(playerid) == COLOR_GREEN)
            {
                new color,clan = GetPlayerClan(playerid);
                color = Clans[clan][cColor];
                SetPlayerColor(playerid,color);
            }
        else
            {
                SetPlayerColor(playerid,COLOR_GREEN);
            }
    }
//i use this with timer..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)