07.10.2010, 16:44
Hey,
When I compile I get loads of loose indentation warnings.
Here is the code it points to:
the errors :
When I compile I get loads of loose indentation warnings.
Here is the code it points to:
pawn Код:
if(strcmp(cmd,"/sellgun",true)==0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pJob] != 9)
{
SendClientMessage(playerid,COLOR_GREY," You are not a Arms Dealer !");
return 1;
}
new x_weapon[256],weapon[MAX_PLAYERS],ammo[MAX_PLAYERS],price[MAX_PLAYERS];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
new level = PlayerInfo[playerid][pArmsSkill];
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /sellgun [playerid/PartOfName] [weaponname]");
SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 1 Weapons: flowers(25) knuckles(25) sdpistol(100) shotgun(200)");
if(level <= 50){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 2 Weapons: mp5(500) rifle(1000) cane(25) baseballbat(25)");}
if(level <= 100){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 3 Weapons: deagle(2000) shovel(25)");}
if(level <= 200){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 4 Weapons: ak47(4000) m4(4250) poolcue(25) golfclub(25)");}
if(level <= 400){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 5 Weapons: spas12(6500) sniper(6500) kantana(25) dildo(25)");}
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
x_weapon = strtok(cmdtext, idx);
if(!strlen(x_weapon))
{
new level = PlayerInfo[playerid][pArmsSkill];
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /sellgun [playerid/PartOfName] [weaponname]");
SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 1 Weapons: flowers(25) knuckles(25) sdpistol(100) shotgun(200)");
if(level <= 50){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 2 Weapons: mp5(500) rifle(1000) cane(25) baseballbat(25)");}
if(level <= 100){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 3 Weapons: deagle(2000) shovel(25)");}
if(level <= 200){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 4 Weapons: ak47(4000) m4(4250) poolcue(25) golfclub(25)");}
if(level <= 400){SendClientMessage(playerid, COLOR_GREY, "Arms Dealer Level 5 Weapons: spas12(6500) sniper(6500) kantana(25) dildo(25)");}
return 1;
}
}
new level = PlayerInfo[playerid][pArmsSkill];
if(strcmp(x_weapon,"sdpistol",true) == 0) { if(PlayerInfo[playerid][pMats] >= 100) { weapon[playerid] = 23; price[playerid] = 100; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 23; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } }
else if(strcmp(x_weapon,"flowers",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 14; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 14; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } }
else if(strcmp(x_weapon,"knuckles",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 0; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 0; PlayerInfo[giveplayerid][pAmmo1] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } }
else if(level <= 100){SendClientMessage(playerid,COLOR_GREY,"You are not level 3 arms dealer!"); return 1;} else if(strcmp(x_weapon,"deagle",true) == 0) { if(PlayerInfo[playerid][pMats] >= 2000) { weapon[playerid] = 24; price[playerid] = 2000; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 24; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } }
else if(level <= 50){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"mp5",true) == 0) { if(PlayerInfo[playerid][pMats] >= 500) { weapon[playerid] = 29; price[playerid] = 500; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 29; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21178
else if(level <= 50){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"cane",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 15; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 15; PlayerInfo[giveplayerid][pAmmo2] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21179
else if(level <= 100){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"shovel",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 6; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 6; PlayerInfo[giveplayerid][pAmmo2] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21180
else if(level <= 200){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"poolcue",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 7; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 7; PlayerInfo[giveplayerid][pAmmo2] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21181
else if(level <= 50){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"baseballbat",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 5; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 5; PlayerInfo[giveplayerid][pAmmo2] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21182
else if(level <= 200){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"golfclub",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 2; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 2; PlayerInfo[giveplayerid][pAmmo2] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21183
else if(level <= 400){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"kantana",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 8; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 8; PlayerInfo[giveplayerid][pAmmo2] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21184
else if(level <= 200){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"golfclub",true) == 0) { if(PlayerInfo[playerid][pMats] >= 25) { weapon[playerid] = 10; price[playerid] = 25; ammo[playerid] = 1; PlayerInfo[giveplayerid][pGun1] = 10; PlayerInfo[giveplayerid][pAmmo2] = 1; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21185
else if(strcmp(x_weapon,"shotgun",true) == 0) { if(PlayerInfo[playerid][pMats] >= 200) { weapon[playerid] = 25; price[playerid] = 200; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 25; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21186
else if(level <= 400){SendClientMessage(playerid,COLOR_GREY,"You are not level 5 arms dealer!"); return 1;} else if(strcmp(x_weapon,"spas12",true) == 0) { if(PlayerInfo[playerid][pMats] >= 6500) { weapon[playerid] = 27; price[playerid] = 6500; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 27; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21187
else if(level <= 400){SendClientMessage(playerid,COLOR_GREY,"You are not level 5 arms dealer!"); return 1;} else if(strcmp(x_weapon,"sniper",true) == 0) { if(PlayerInfo[playerid][pMats] >= 6500) { weapon[playerid] = 34; price[playerid] = 6500; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 34; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21188
else if(level <= 200){SendClientMessage(playerid,COLOR_GREY,"You are not level 4 arms dealer!"); return 1;} else if(strcmp(x_weapon,"ak47",true) == 0) { if(PlayerInfo[playerid][pMats] >= 4000) { weapon[playerid] = 30; price[playerid] = 4000; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 30; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21189
else if(level <= 200){SendClientMessage(playerid,COLOR_GREY,"You are not level 4 arms dealer!"); return 1;} else if(strcmp(x_weapon,"m4",true) == 0) { if(PlayerInfo[playerid][pMats] >= 4250) { weapon[playerid] = 31; price[playerid] = 4250; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 31; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21190
else if(level <= 50){SendClientMessage(playerid,COLOR_GREY,"You are not level 2 arms dealer!"); return 1;} else if(strcmp(x_weapon,"rifle",true) == 0) { if(PlayerInfo[playerid][pMats] >= 1000) { weapon[playerid] = 33; price[playerid] = 1000; ammo[playerid] = 15000; PlayerInfo[giveplayerid][pGun2] = 33; PlayerInfo[giveplayerid][pAmmo2] = 15000; } else { SendClientMessage(playerid,COLOR_GREY," Not enough Materials for that Weapon!"); return 1; } } // line 21191
else { SendClientMessage(playerid,COLOR_GREY," Invalid Weapon name!"); return 1; } // line 21192
if (ProxDetectorS(5.0, playerid, giveplayerid))
{
if(PlayerInfo[playerid][pMiserPerk] > 0)
{
new skill = 2 * PlayerInfo[playerid][pMiserPerk];
new mats = price[playerid] / 100;
price[playerid] -= (mats)*(skill);
}
ConsumingMoney[playerid] = 1;
PlayerInfo[playerid][pArmsSkill] ++;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " You have given %s, a %s with %d ammo, for %d Materials.", giveplayer,x_weapon, ammo[playerid], price[playerid]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " You have recieved a %s with %d ammo from %s.", x_weapon, ammo[playerid], sendername);
SendClientMessage(giveplayerid, COLOR_GRAD1, string);
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s created a Gun from Materials, and hands it to %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(giveplayerid,weapon[playerid],ammo[playerid]);
PlayerInfo[playerid][pMats] -= price[playerid];
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Your too far away.");
return 1;
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Код:
C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21178) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21179) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21180) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21181) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21182) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21183) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21184) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21185) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21186) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21188) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21189) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21190) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21191) : warning 217: loose indentation C:\Documents and Settings\Rilehh\Desktop\Sa-mp\gamemodes\london-rp.pwn(21192) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase Header size: 5972 bytes Code size: 1074468 bytes Data size: 4404932 bytes