C:\Users\Bear\Documents\AutomaticSolution Software\gamemodes\gamemode.pwn(55232) : error 017: undefined symbol "DropInfo" C:\Users\Bear\Documents\AutomaticSolution Software\gamemodes\gamemode(55232) : error 036: empty statement C:\Users\Bear\Documents\AutomaticSolution Software\gamemodes\gamemode(55232) : error 017: undefined symbol "i" C:\Users\Bear\Documents\AutomaticSolution Software\gamemodes\gamemode(55232) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
dcmd_pickup(playerid, params[]) { new string[128]; for(new i = 0; i < sizeof(DropInfo); i++) { if (IsPlayerInRangeOfPoint(playerid, 2.0,DropInfo[i][DropGunPosX],DropInfo[i][DropGunPosY],DropInfo[i][DropGunPosZ])) { if(GetPlayerVirtualWorld(playerid) == DropInfo[i][DropGunVWorld] && GetPlayerInterior(playerid) == DropInfo[i][DropGunVWorld]) { new sendername[MAX_PLAYER_NAME]; GetPlayerRPName(playerid, sendername, sizeof(sendername)); DestroyDynamicObject(DropObject[i]); GivePlayerWeaponEx(playerid,DropInfo[i][DropGunAmmount][0],DropInfo[i][DropGunAmmount][1]); DropInfo[i][DropGunPosX] = 0.0; DropInfo[i][DropGunPosY] = 0.0; DropInfo[i][DropGunPosZ] = 0.0; DropInfo[i][DropGunAmmount][0] = 0; DropInfo[i][DropGunAmmount][1] = 0; format(string, sizeof(string), "* %s picks up a weapon.", sendername); SendLocalMessage(playerid, string, 10.0, COLOR_ACTION, COLOR_ACTION); return 1; } } } return 1; }
dcmd_pickup(playerid, params[])
{
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerInRangeOfPoint(i, 2.0,DropInfo[i][DropGunPosX],DropInfo[i][DropGunPosY],DropInfo[i][DropGunPosZ]))
{
if(GetPlayerVirtualWorld(i) == DropInfo[i][DropGunVWorld] && GetPlayerInterior(i) == DropInfo[i][DropGunVWorld])
{
new sendername[MAX_PLAYER_NAME];
GetPlayerRPName(playerid, sendername, sizeof(sendername));
DestroyDynamicObject(DropObject[i]);
GivePlayerWeaponEx(playerid,DropInfo[i][DropGunAmmount][0],DropInfo[i][DropGunAmmount][1]);
DropInfo[i][DropGunPosX] = 0.0;
DropInfo[i][DropGunPosY] = 0.0;
DropInfo[i][DropGunPosZ] = 0.0;
DropInfo[i][DropGunAmmount][0] = 0;
DropInfo[i][DropGunAmmount][1] = 0;
format(string, sizeof(string), "* %s picks up a weapon.", sendername);
SendLocalMessage(playerid, string, 10.0, COLOR_ACTION, COLOR_ACTION);
return 1;
}
}
}
return 1;
}
You are using a forloop
PHP код:
|
error 017: undefined symbol "DropInfo" |
Well, just read the error carefully :
Is DropInfo even declared in the script? If yes then it must be declared globally, i.e., out of all stocks and public functions, probably somewhere in the top region of the script.. |
enum dData { DropGunAmmount[2],//ModelID & Bullets Float:DropGunPosX, Float:DropGunPosY, Float:DropGunPosZ, DropGunVWorld, DropGunInterior, }; new DropInfo[MAX_DROP_ITEMS][dData];