CMD:editobj(playerid, params[]) { new string[128], idx; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pMapper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(sscanf(params, "i", idx)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /editobj [Object ID]"); if(!ObjInfo[idx][oModel]) return SendClientMessage(playerid, COLOR_GREY, "Invalid Object id."); GetDynamicObjectPos(ObjInfo[idx][oObj], oCX[playerid], oCY[playerid], oCZ[playerid]); GetDynamicObjectRot(ObjInfo[idx][oObj], oCRX[playerid], oCRY[playerid], oCRZ[playerid]); EditDynamicObject(playerid, ObjInfo[idx][oObj]); format(string, sizeof(string), "MapperWarn: %s is editting a object. (object id: %d)", RPN(playerid), idx); SendMapperMessage(COLOR_GREEN, 1, string); return 1; }
C:\Users\Fabio\Desktop\LSC-RP\gamemodes\ZRP.pwn(13967) : error 028: invalid subscript (not an array or too many subscripts): "oCX" C:\Users\Fabio\Desktop\LSC-RP\gamemodes\ZRP.pwn(13967) : warning 215: expression has no effect C:\Users\Fabio\Desktop\LSC-RP\gamemodes\ZRP.pwn(13967) : error 001: expected token: ";", but found "]" C:\Users\Fabio\Desktop\LSC-RP\gamemodes\ZRP.pwn(13967) : error 029: invalid expression, assumed zero C:\Users\Fabio\Desktop\LSC-RP\gamemodes\ZRP.pwn(13967) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
enum objInfo { oObj, Text3D:oText, oModel, Float:oCX, Float:oCY, Float:oCZ, Float:oCRX, Float:oCRY, Float:oCRZ, Float:oOX, Float:oOY, Float:oOZ, Float:oORX, Float:oORY, Float:oORZ, } new ObjInfo[MAX_OBJ][objInfo];
GetDynamicObjectPos(ObjInfo[idx][oObj], oCX[playerid], oCY[playerid], oCZ[playerid]);
enum objInfo
{
oObj,
Text3D:oText,
oModel,
Float:oCX,
Float:oCY,
Float:oCZ,
Float:oCRX,
Float:oCRY,
Float:oCRZ,
Float:oOX,
Float:oOY,
Float:oOZ,
Float:oORX,
Float:oORY,
Float:oORZ
}
pawn Код:
|