23.04.2010, 20:34
Can some one tell me what could this mean ...
36911/36934 :
36951 :
Quote:
C:\DOCUME~1\Ivan\Desktop\GTARP2\GTARP\GAMEMO~1\gta rp.pwn(36911) : warning 219: local variable "playername" shadows a variable at a preceding level C:\DOCUME~1\Ivan\Desktop\GTARP2\GTARP\GAMEMO~1\gta rp.pwn(36934) : warning 219: local variable "playername" shadows a variable at a preceding level C:\DOCUME~1\Ivan\Desktop\GTARP2\GTARP\GAMEMO~1\gta rp.pwn(36951) : warning 219: local variable "string" shadows a variable at a preceding level |
Quote:
if(strcmp("/plantbomb", cmd, true) == 0) { tmp = strtok(cmdtext, idx); if (!Bombs[playerid]) return SendClientMessage(playerid, ORANGE," You do not have bombs."); if(!strlen(tmp)) return SendClientMessage(playerid, ORANGE,"/activatebomb [veh/foot]"); else if (strcmp("foot", tmp, true) == 0) { if (GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, COLOR_ORANGE, " YOu are not on foot"); new Float:X,Float:Y,Float:Z,Float:A; new playername[24]; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid,A); GetPlayerName(playerid, playername, 24); explosive++; Y += (1 * floatcos(-A, degrees)); X += (1 * floatsin(-A, degrees)); ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0); ExplosiveObject[explosive] = CreateObject(1654, X, Y, Z-0.9, 0, 90, 0); Bomber[playerid] = 1; BombInfo[explosive][bombX] = X; BombInfo[explosive][bombY] = Y; BombInfo[explosive][bombZ] = Z; strmid(BombInfo[explosive][bombPlanter], playername, 0, strlen(playername), 50); printf("%d",explosive); SendClientMessage(playerid,COLOR_ORANGE," You planted a bomb on the flour. Type /activatebomb to activate it."); Bombs[playerid]--; } else if (strcmp("veh", tmp, true) == 0) { if (IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); new playername[24]; GetPlayerName(playerid, playername, 24); VehicleBombed[vehicleid] = 1; Bomber[playerid] = 2; explosive++; strmid(BombInfo[explosive][bombPlanter], playername, 0, strlen(playername), 50); SendClientMessage(playerid,ORANGE," You planted a bomb in a car. Type /activatebomb to activate it."); Bombs[playerid]--; } else SendClientMessage(playerid, ORANGE, " You are not in any vehicle"); } else SendClientMessage(playerid, ORANGE,"/plantbomb [veh/foot]"); return 1; } |
Quote:
if(strcmp(cmdtext, "/bomber", true)==0) { new string[128]; for(new i = 0; i < MAX_BOMBS; i++) { if (PlayerToPoint(playerid,3,BombInfo[i][bombX],BombInfo[i][bombY],BombInfo[i][bombZ])) { printf("%d - %d",explosive,i); format(string,sizeof(string),"Bomber: %s - Bomb #%d",BombInfo[i][bombPlanter],i); SendClientMessage(playerid,COLOR_GREY,string); } } return 1; } |