SA-MP Forums Archive
error 008: must be a constant expression; assumed zero (HELP PLEASE) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 008: must be a constant expression; assumed zero (HELP PLEASE) (/showthread.php?tid=462117)



error 008: must be a constant expression; assumed zero (HELP PLEASE) - mahardika - 05.09.2013

i have this error
Код:
error 008: must be a constant expression; assumed zero
i have search at forum but no one help me for this code:

Код:
public OnPlayerEditAttachedObject(playerid, response, slotselection[playerid], ptModelID, ptBone, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ) // at this line
{
    if(response)
    {
        new p = slotselection[playerid];
        SendClientMessage(playerid, COLOR_GREEN, "Attached object edition saved.");

        PlayerToyInfo[playerid][p][ptPosX] = fOffsetX;
        PlayerToyInfo[playerid][p][ptPosY] = fOffsetY;
        PlayerToyInfo[playerid][p][ptPosZ] = fOffsetZ;
        PlayerToyInfo[playerid][p][ptRotX] = fRotX;
        PlayerToyInfo[playerid][p][ptRotY] = fRotY;
        PlayerToyInfo[playerid][p][ptRotZ] = fRotZ;
        PlayerToyInfo[playerid][p][ptScaleX] = fScaleX;
        PlayerToyInfo[playerid][p][ptScaleY] = fScaleY;
        PlayerToyInfo[playerid][p][ptScaleZ] = fScaleZ;
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Attached object edition not saved.");

        new p = slotselection[playerid];
        SetPlayerAttachedObject(playerid, slotselection[playerid], ptModelID, ptBone, PlayerToyInfo[playerid][p][ptPosX], PlayerToyInfo[playerid][p][ptPosY], PlayerToyInfo[playerid][p][ptPosZ], PlayerToyInfo[playerid][p][ptRotX], PlayerToyInfo[playerid][p][ptRotY], PlayerToyInfo[playerid][p][ptRotZ], PlayerToyInfo[playerid][p][ptScaleX], PlayerToyInfo[playerid][p][ptScaleY], PlayerToyInfo[playerid][p][ptScaleZ]);
    }
    return 1;
}
PLEASE HELP


Re: error 008: must be a constant expression; assumed zero (HELP PLEASE) - iZN - 05.09.2013

EDIT:
What are you doing?
pawn Код:
public OnPlayerEditAttachedObject(playerid, response, slotselection[playerid], ptModelID, ptBone, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
This must be
pawn Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)



Re: error 008: must be a constant expression; assumed zero (HELP PLEASE) - mahardika - 05.09.2013

my bad,
BTW thanks