Array index out of bounds
#3

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
Which array is sized 1000?
You are accessing it with index 65535, presumibly an invalid id.
Don't have anything else other than the Stock functions

Код:
stock ReturnName(playerid, underScore = 1)
{
    new playersName[MAX_PLAYER_NAME + 2];
    GetPlayerName(playerid, playersName, sizeof(playersName));
 
    if(!underScore)
    {
        {
            for(new i = 0, j = strlen(playersName); i < j; i ++)
            {
                if(playersName[i] == '_')
                {
                    playersName[i] = ' ';
                }
            }
        }
    }
 
    return playersName;
}
stock SendClientMessageEx(playerid, color, const str[], {Float,_}:...)
{
    static
        args,
        start,
        end,
        string[156]
    ;
    #emit LOAD.S.pri 8
    #emit STOR.pri args
 
    if (args > 12)
    {
        #emit ADDR.pri str
        #emit STOR.pri start
 
        for (end = start + (args - 12); end > start; end -= 4)
        {
            #emit LREF.pri end
            #emit PUSH.pri
        }
        #emit PUSH.S str
        #emit PUSH.C 156
        #emit PUSH.C string
        #emit PUSH.C args
        #emit SYSREQ.C format
 
        SendClientMessage(playerid, color, string);
 
        #emit LCTRL 5
        #emit SCTRL 4
        #emit RETN
    }
    return SendClientMessage(playerid, color, str);
}
Reply


Messages In This Thread
Array index out of bounds - by Mo123 - 28.10.2018, 13:28
Re: Array index out of bounds - by v1k1nG - 28.10.2018, 13:47
Re: Array index out of bounds - by Mo123 - 28.10.2018, 14:23
Re: Array index out of bounds - by Calisthenics - 28.10.2018, 14:27

Forum Jump:


Users browsing this thread: 1 Guest(s)