03.10.2014, 10:39
This is the whole cmd but i recive these errors and i could use your help guys :/ Using a_vehicles.inc
PHP код:
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(5471) : error 017: undefined symbol "EditVehiclePos"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27131) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditVehicle")
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27133) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27134) : error 017: undefined symbol "idx"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27134) : warning 215: expression has no effect
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : error 001: expected token: ",", but found "["
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : error 029: invalid expression, assumed zero
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : warning 215: expression has no effect
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : error 001: expected token: ";", but found "]"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
PHP код:
new vEdit[MAX_PLAYERS];
new vEditID[MAX_PLAYERS];
new Float:vPos[MAX_PLAYERS];
new Float:vRot[MAX_PLAYERS];
new oldvID;
new Float:oldvdX, Float:oldvdY, Float:oldvdZ, Float:oldvdRX, Float:oldvdRY, Float:oldvdRZ;
PHP код:
vEdit[playerid] = 0; vEditID[playerid] = 0;
PHP код:
CMD:editveh(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
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(!mDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Mapper Duty.");
if(sscanf(params, "i", idx)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /editveh [vehicleid]");
if(!vvvehInfo[idx][vvvModel]) return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle id.");
vEdit[playerid] = 1;
vEditID[playerid] = idx;
SetVehiclePos(vehicleid, vPos[0], vPos[1], vPos[2]);
SetVehicleZAngle(vehicleid, vRot[2]);
5471 EditVehiclePos(playerid, vvvehInfo[idx][vvveh]);
format(string, sizeof(string), " You are now editing vehicle ID %d's position.", idx);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "MapperWarn: %s is editting vehicle ID %d's position.)", RPN(playerid), idx);
SendMapperMessage(COLOR_GREEN, 1, string);
return 1;
}
PHP код:
27131 public OnPlayerEditVehicle(playerid, vehicleid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
27134 new vehicleid = GetPlayerVehicleID(playerid);
27135 idx = vEditID[playerid];
if(response == EDIT_RESPONSE_UPDATE)
{
SetVehiclePos(vehicleid, x, y, z);
SetVehicleZAngle(vehicleid, rz);
}
else if(response == EDIT_RESPONSE_CANCEL)
{
27143 SetVehiclePos(vehicleid, vPos[playerid][0], vPos[playerid][1], vPos[playerid][2]);
SetVehicleZAngle(vehicleid, vRot[playerid][2]);
vPos[playerid][0] = 0; vPos[playerid][1] = 0; vPos[playerid][2] = 0;
vRot[playerid][2] = 0;
format(string, sizeof(string), " You have canceled editing vehicle ID %d.", idx);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(response == EDIT_RESPONSE_FINAL)
{
SetVehiclePos(vehicleid, x, y, z);
SetVehicleZAngle(vehicleid, rz);
if(vEdit[playerid] == 1)
{
oldvID = vvvehInfo[idx][vvvModel];
vvvehInfo[idx][vX] = x;
vvvehInfo[idx][vY] = y;
vvvehInfo[idx][vZ] = z;
vvvehInfo[idx][vRX] = rx;
vvvehInfo[idx][vRY] = ry;
vvvehInfo[idx][vRZ] = rz;
oldvdX = vvvehInfo[idx][vX];
oldvdY = vvvehInfo[idx][vY];
oldvdZ = vvvehInfo[idx][vZ];
oldvdRX = vvvehInfo[idx][vRX];
oldvdRY = vvvehInfo[idx][vRY];
oldvdRZ = vvvehInfo[idx][vRZ];
vEdit[playerid] = 0;
vEditID[playerid] = 0;
format(string, sizeof(string), " You have finished editing vehicle ID %d's position.", idx);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1
}