Array index out of bounds
#1

pawn Код:
if(mysql_fetch_row(line))
            {
                new data[3][50];
                new data2[5];
                sscanf(line, "p|ssdddddds", data[0], data[1], data2[0], data2[1], data2[2], data2[3],data2[4],data[5], data[2]);
                PInfo[playerid][Kills] = data2[0];
                PInfo[playerid][Deaths] = data2[1];
                SetPVarInt(playerid, "Logged", 1);
                SetPVarInt(playerid, "Deaths", data2[1]);
                SetPlayerScore(playerid, data2[2]);
                GivePlayerMoney(playerid,data2[3]);
                PInfo[playerid][Level] = data2[4];
                PInfo[playerid][VIP] = data2[5];
                SendClientMessage(playerid, limegreen, "ACCOUNT: Login Successful!");
                mysql_free_result();
                if(PInfo[playerid][Level] == 0) SendClientMessage(playerid,limegreen,"You have logged in as a Normal Player");
                if(PInfo[playerid][Level] == 1) SendClientMessage(playerid,limegreen,"You have logged in as a Level 1 Admin");
                if(PInfo[playerid][Level] == 2) SendClientMessage(playerid,limegreen,"You have logged in as a Level 2 Admin");
                if(PInfo[playerid][Level] == 3) SendClientMessage(playerid,limegreen,"You have logged in as a Level 3 Admin");
                if(PInfo[playerid][Level] == 4) SendClientMessage(playerid,limegreen,"You have logged in as a Level 4 Admin");
                if(PInfo[playerid][Level] == 5) SendClientMessage(playerid,limegreen,"You have logged in as a Level 5 Admin");
                if(PInfo[playerid][Level] == 6) SendClientMessage(playerid,limegreen,"You have logged in as a Level 6 Admin (Scripter)");
                if(PInfo[playerid][Level] == 7) SendClientMessage(playerid,limegreen,"You have logged in as a Level 7 Admin (Owner)");
                format(string,sizeof(string),"[Donor Level %d]",PInfo[playerid][VIP]);
                SendClientMessage(playerid,limegreen,string);
            }
Код:
C:\Users\Chris\Documents\Serv\Server\gamemodes\MySQL CoS.pwn(3988) : error 032: array index out of bounds (variable "data")
C:\Users\Chris\Documents\Serv\Server\gamemodes\MySQL CoS.pwn(3996) : error 032: array index out of bounds (variable "data2")
Eh, thanks for the help.
Reply


Messages In This Thread
Array index out of bounds - by Snipa - 05.04.2011, 00:59
Re: Array index out of bounds - by Calgon - 05.04.2011, 03:41

Forum Jump:


Users browsing this thread: 1 Guest(s)