01.05.2013, 16:04
Ok i keep getting these 3 warnings and still i tried everything to fix them and doesn't work
The first 2 Warnings
The Code:
the 3rd Warning:
i wish i can supply you with the code,but the Script ends at 96018 There's no such Line!
The first 2 Warnings
Код:
C:\Users\user\Desktop\*\GLRP.pwn(65281) : warning 219: local variable "i" shadows a variable at a preceding level C:\Users\user\Desktop\*\GLRP.pwn(65297) : warning 217: loose indentation
Код:
CMD:destroyboombox(playerid, params[]) { if(GetPVarType(playerid, "pBoomBox")) { DestroyDynamicObject(GetPVarInt(playerid, "pBoomBox")); DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid, "pBoomBoxLabel")); DeletePVar(playerid, "pBoomBox"); DeletePVar(playerid, "pBoomBoxStation"); DeletePVar(playerid, "pBoomBoxLabel"); DeletePVar(playerid, "pBoomBoxX"); DeletePVar(playerid, "pBoomBoxY"); DeletePVar(playerid, "pBoomBoxZ"); if(GetPVarType(playerid, "pBoomBoxArea")) { new string[128]; format(string, sizeof(string), "* %s has destroyed the boombox.", GetPlayerNameEx(playerid)); foreach(Player, i) { if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pBoomBoxArea"))) { StopAudioStreamForPlayer(playerid); SendClientMessage(i, COLOR_PURPLE, string); } } DeletePVar(playerid, "pBoomBoxArea"); } SendClientMessage(playerid, COLOR_WHITE, "You've destroyed your boombox!"); } else { foreach(Player, i) // This is line 65281 { if(GetPVarType(i, "pBoomBox")) { if(GetPVarInt(i, "pBoomBoxVW") == GetPlayerVirtualWorld(playerid) && GetPVarInt(i, "pBoomBoxInt") == GetPlayerInterior(playerid) && IsPlayerInRangeOfPoint(playerid, 5.0, GetPVarFloat(i, "pBoomBoxX"), GetPVarFloat(i, "pBoomBoxY"), GetPVarFloat(i, "pBoomBoxZ"))) { DestroyDynamicObject(GetPVarInt(i, "pBoomBox")); DestroyDynamic3DTextLabel(Text3D:GetPVarInt(i, "pBoomBoxLabel")); DeletePVar(i, "pBoomBox"); DeletePVar(i, "pBoomBoxStation"); DeletePVar(i, "pBoomBoxLabel"); DeletePVar(i, "pBoomBoxX"); DeletePVar(i, "pBoomBoxY"); DeletePVar(i, "pBoomBoxZ"); DeletePVar(i, "pBoomBoxInt"); DeletePVar(i, "pBoomBoxVW"); new string[128]; if(GetPVarType(i, "pBoomBoxArea")) { format(string, sizeof(string), "* %s has destroyed the boombox.", GetPlayerNameEx(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInDynamicArea(playerid, GetPVarInt(i, "pBoomBoxArea"))) { StopAudioStreamForPlayer(playerid); SendClientMessage(playerid, COLOR_PURPLE, string); } } DeletePVar(i, "pBoomBoxArea"); } format(string, sizeof(string), "%s has destroyed your boombox!", GetPlayerNameEx(playerid)); SendClientMessage(i, COLOR_WHITE, string); return 1; } } } SendClientMessage(playerid, COLOR_WHITE, "You don't have a boombox or you are not near one to destroy."); // this is line 65297 } return 1; }
Код:
C:\Users\user\Desktop\*\GLRP.pwn(96019) : warning 203: symbol is never used: "tracecall"