02.05.2015, 14:34
I did check what bug is but seems looks everything are in a right place please help.
Код:
RRP.PWN(4317) : warning 219: local variable "rx" shadows a variable at a preceding level RRP.PWN(4317) : warning 219: local variable "ry" shadows a variable at a preceding level RRP.PWN(4317) : warning 219: local variable "rz" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings.
Код:
This line > public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
if(response)
{
new string[128];
if(GetPVarInt(playerid, "gEdit") == 1)
{
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to perform this action!");
new gateid = GetPVarInt(playerid, "EditingGateID");
GateInfo[gateid][gPosX] = x;
GateInfo[gateid][gPosY] = y;
GateInfo[gateid][gPosZ] = z;
GateInfo[gateid][gRotX] = rx;
GateInfo[gateid][gRotY] = ry;
GateInfo[gateid][gRotZ] = rz;
SaveGates();
format(string, sizeof(string), "You have finished editing the open position of Gate ID: %d", gateid);
SendClientMessage(playerid, COLOR_WHITE, string);
DeletePVar(playerid, "gEdit");
DeletePVar(playerid, "EditingGateID");
}
if(GetPVarInt(playerid, "gEdits") == 2)
{
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to perform this action!");
new gateid = GetPVarInt(playerid, "EditingGateIDs");
GateInfo[gateid][gPosXM] = x;
GateInfo[gateid][gPosYM] = y;
GateInfo[gateid][gPosZM] = z;
GateInfo[gateid][gRotXM] = rx;
GateInfo[gateid][gRotYM] = ry;
GateInfo[gateid][gRotZM] = rz;
SaveGates();
format(string, sizeof(string), "You have finished editing the closed position of Gate ID: %d", gateid);
SendClientMessage(playerid, COLOR_WHITE, string);
DeletePVar(playerid, "gEdits");
DeletePVar(playerid, "EditingGateIDs");
}
if(response == EDIT_RESPONSE_CANCEL)
{
if(GetPVarType(playerid, "gEdit") == 1)
{
CreateGate(GetPVarInt(playerid, "EditingGateID"));
DeletePVar(playerid, "gEdit");
DeletePVar(playerid, "EditingGateID");
SendClientMessage(playerid, COLOR_WHITE, "You have stopped yourself from editing the gate.");
}
else
{
CreateGate(GetPVarInt(playerid, "EditingObjectID"));
DeletePVar(playerid, "oEdit");
DeletePVar(playerid, "EditingObjectID");
SendClientMessage(playerid, COLOR_WHITE, "You have stopped yourself from editing the object.");
}
}
return 1;
}

