02.10.2011, 05:53
I am making a simple /shop cmd that displays a list dialog, then you select your gun but when i try to compile i get this error
(35065) : error 030: compound statement not closed at the end of file (started at line 34889)
here is lines 34889 through 35064, it says the error is on line 35065 but there are only 35064 lines in my script...
anyone know whats wrong with it? if so can you please explain why I am getting this error? thanks in advance!
(35065) : error 030: compound statement not closed at the end of file (started at line 34889)
here is lines 34889 through 35064, it says the error is on line 35065 but there are only 35064 lines in my script...
Code:
if(listitem == 0) //health { if(PlayerInfo[playerid][pCash] < 500) { SendClientMessage(playerid, COLOR_GREY, " You cant afford that !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-500; GivePlayerMoney(playerid,-500); SetPlayerHealth(playerid, 100); TogglePlayerControllable(playerid,1); } } if(listitem == 1) // Armor { if(PlayerInfo[playerid][pCash] < 750) { SendClientMessage(playerid, 0xFFFFFFFF, " You do not have enough cash for that !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-750; GivePlayerMoney(playerid,-750); SetPlayerArmour(playerid, 100); TogglePlayerControllable(playerid, 1); } } if(listitem == 2)//Colt45 { if(PlayerInfo[playerid][pCash] < 350) { SendClientMessage(playerid, 0xFFFFFFFF, " You do not have enough cash for that !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-350; GivePlayerMoney(playerid, -350); GivePlayerWeapon(playerid, 22, 99999); TogglePlayerControllable(playerid, 1); } if(listitem == 3)//deagle { if(PlayerInfo[playerid][pCash] < 25000) { SendClientMessage(playerid, 0xFFFFFFFF, " You do not have enough cash for that !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-25000; GivePlayerMoney(playerid,-25000); GivePlayerWeapon(playerid, 24, 99999); TogglePlayerControllable(playerid,1); } } if(listitem == 4)//Uzi { if(PlayerInfo[playerid][pCash] < 8000) { SendClientMessage(playerid, 0xFFFFFFFF, " You don't have the $8000 !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-8000; GivePlayerMoney(playerid,-8000); GivePlayerWeapon(playerid, 28, 9999); TogglePlayerControllable(playerid,1); } } if(listitem == 5)//mp5 { if(PlayerInfo[playerid][pCash] < 4000) { SendClientMessage(playerid, 0xFFFFFFFF, " You don't have the $4000 !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-4000; GivePlayerMoney(playerid,-4000); GivePlayerWeapon(playerid, 29, 9999); TogglePlayerControllable(playerid,1); } } if(listitem == 6)//shotgun { if(PlayerInfo[playerid][pCash] < 3500) { SendClientMessage(playerid, 0xFFFFFFFF, " You don't have the $3500 !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-3500; GivePlayerMoney(playerid,-3500); GivePlayerWeapon(playerid, 25, 9999); TogglePlayerControllable(playerid,1); } } if(listitem == 7)//CombatShotgun { if(PlayerInfo[playerid][pCash] < 75000) { SendClientMessage(playerid, 0xFFFFFFFF, "You don't have the $75,000 !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-75000; GivePlayerMoney(playerid,-75000); GivePlayerWeapon(playerid, 27, 9999); TogglePlayerControllable(playerid,1); } } if(listitem == 8)//ak-47 { if(PlayerInfo[playerid][pCash] < 40000) { SendClientMessage(playerid, 0xFFFFFFFF, "You do not have the $40,000 !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-40000; GivePlayerMoney(playerid,-40000); GivePlayerWeapon(playerid, 30, 9999); TogglePlayerControllable(playerid,1); } } if(listitem == 9)//m4 { if(PlayerInfo[playerid][pCash] < 50000) { SendClientMessage(playerid, 0xFFFFFFFF, "You don't have the $50,000 !"); TogglePlayerControllable(playerid,1); return 1; } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-50000; GivePlayerMoney(playerid,-50000); GivePlayerWeapon(playerid, 31, 9999); TogglePlayerControllable(playerid,1); } } if(listitem == 10)//sniper { if(PlayerInfo[playerid][pCash] < 75000) { SendClientMessage(playerid, 0xFFFFFFFF, " You do not have the $75,000 !"); TogglePlayerControllable(playerid,1); } else { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-75000; GivePlayerMoney(playerid,-75000); GivePlayerWeapon(playerid, 34, 9999); } } } } return 0; }