array index out of bounds (variable "pInfo")
#1

Hello dear samp members. I need some help with falowing code and errors..

pawn Код:
(1134) : error 008: must be a constant expression; assumed zero
(1140 -- 1141) : error 032: array index out of bounds (variable "pInfo")
(1146) : error 032: array index out of bounds (variable "pInfo")
pawn Код:
public OnPlayerEditAttachedObject( playerid, response, pInfo[playerid][indextoy], pInfo[playerid][modelidtoy], pInfo[playerid][boneid],
                                   pInfo[playerid][fOffsetX], pInfo[playerid][fOffsetY], pInfo[playerid][fOffsetZ],
                                   pInfo[playerid][fRotX], pInfo[playerid][fRotY], pInfo[playerid][fRotZ],
                                   pInfo[playerid][fScaleX], pInfo[playerid][fScaleY], pInfo[playerid][fScaleZ] )//THIS LINE!!!!!!!
{
    new debug_string[256+1];
    format(debug_string,256,"SetPlayerAttachedObject(playerid,%d,%d,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f)",//THIS LINE!!!
        pInfo[playerid][indextoy],pInfo[playerid][modelidtoy],pInfo[playerid][boneid],pInfo[playerid][fOffsetX],pInfo[playerid][fOffsetY],pInfo[playerid][fOffsetZ],pInfo[playerid][fRotX],pInfo[playerid][fRotY],pInfo[playerid][fRotZ],pInfo[playerid][fScaleX],pInfo[playerid][fScaleY],pInfo[playerid][fScaleZ]);//THIS LINE!!!!

    print(debug_string);
    //SendClientMessage(playerid, 0xFFFFFFFF, debug_string);

    SetPlayerAttachedObject(playerid,pInfo[playerid][indextoy],pInfo[playerid][modelidtoy],
    pInfo[playerid][boneid],pInfo[playerid][fOffsetX],pInfo[playerid][fOffsetY],
    pInfo[playerid][fOffsetZ],pInfo[playerid][fRotX],pInfo[playerid][fRotY],pInfo[playerid][fRotZ],
    pInfo[playerid][fScaleX],pInfo[playerid][fScaleY],pInfo[playerid][fScaleZ]);
    SendClientMessage(playerid, 0xFFFFFFFF, "You finished editing an attached object"); //THIS LINE

    return 1;
}
Thank you for your help with best regards Scrillex.
Reply


Messages In This Thread
array index out of bounds (variable "pInfo") - by Scrillex - 11.04.2015, 23:36
Re: array index out of bounds (variable "pInfo") - by Vince - 12.04.2015, 00:00
Re: array index out of bounds (variable "pInfo") - by Scrillex - 12.04.2015, 00:02
Re: array index out of bounds (variable "pInfo") - by Puppy - 12.04.2015, 00:13
Re: array index out of bounds (variable "pInfo") - by Scrillex - 12.04.2015, 00:16
Re: array index out of bounds (variable "pInfo") - by Scrillex - 12.04.2015, 00:26

Forum Jump:


Users browsing this thread: 1 Guest(s)