23.04.2010, 00:14
Boa noite galera estou tentando fazer um sistema de armas para meu systema de ~Evento~ soque ta ocorrendo uns erros alguem sera que pode me ajudar :P
Code:
//Seta armas if(strcmp(cmdtext,"/earmas",true)==0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); tmp2 = strtok(cmdtext, idx); if(EventoCriado == 0) { SendClientMessage(playerid,0xb9d26eff,"~ Evento trancado"); return 1; } if(!strlen(tmp)) { SendClientMessage(playerid, 0xb9d26eff, "USAGE: /event guns [gunid][ammo]"); return 1; } new gun; new ftext[50]; gun = strval(tmp); if(gun == 1) { ftext = "Brass Knuckles"; } else if(gun == 2) { ftext = "Golf Club"; } else if(gun == 3) { ftext = "NightStick"; } else if(gun == 4) { ftext = "Knife"; } else if(gun == 5) { ftext = "Baseball Bat"; } else if(gun == 6) { ftext = "Shovel"; } else if(gun == 7) { ftext = "Pool Cue"; } else if(gun == 8) { ftext = "Katana"; } else if(gun == 9) { ftext = "Chainsaw"; } else if(gun == 10) { ftext = "Purple Dildo"; } else if(gun == 11) { ftext = "Small White Vibrator"; } else if(gun == 12) { ftext = "Large White Vibrator"; } else if(gun == 13) { ftext = "Silver Vibrator"; } else if(gun == 14) { ftext = "Flowers"; } else if(gun == 15) { ftext = "Cane"; } else if(gun == 16) { ftext = "Grenade"; } else if(gun == 17) { ftext = "Tear Gas"; } else if(gun == 18) { ftext = "Molotov Cocktail"; } else if(gun == 22) { ftext = "9MM"; } else if(gun == 23) { ftext = "Silenced 9mm"; } else if(gun == 24) { ftext = "Desert Eagle"; } else if(gun == 25) { ftext = "Shotgun"; } else if(gun == 26) { ftext = "Sawn-off Shotgun"; } else if(gun == 27) { ftext = "Combat Shotgun"; } else if(gun == 28) { ftext = "Micro SMG"; } else if(gun == 29) { ftext = "MP5"; } else if(gun == 30) { ftext = "AK-47"; } else if(gun == 31) { ftext = "M4"; } else if(gun == 32) { ftext = "Tec9"; } else if(gun == 33) { ftext = "Country Rifle"; } else if(gun == 34) { ftext = "Sniper Rifle"; } else if(gun == 35) { ftext = "Rocket Launcher"; } else if(gun == 36) { ftext = "HS Rocket Launcher"; } else if(gun == 37) { ftext = "Flamethrower"; } else if(gun == 38) { ftext = "Minigun"; } else if(gun == 41) { ftext = "Spraycan"; } else if(gun == 42) { ftext = "Fire Extinguisher"; } else if(gun == 43) { ftext = "Camera"; } else if(gun == 44) { ftext = "Nightvision Goggle"; } else if(gun == 45) { ftext = "Thermal Goggles"; } else if(gun == 46) { ftext = "Parachutte"; } new ammo; if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==36||gun==38||gun==39||gun==40||gun==44||gun==45) { SendClientMessage(playerid, 0xb9d26eff, " ID da arma invalido!"); return 1; } ammo = strval(tmp2); if(ammo <1 ||ammo > 999) { SendClientMessage(playerid, 0xb9d26eff, " Numero de 1 a 999!"); return 1; } for(new i;i<MAX_PLAYERS;i++) { GivePlayerWeapon(i, gun, ammo); return 1; }
Code:
C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(128) : warning 217: loose indentation C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(352) : warning 217: loose indentation C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(366) : error 017: undefined symbol "tmp" C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(366) : error 017: undefined symbol "strtok" C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(367) : error 017: undefined symbol "tmp2" C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(367) : error 017: undefined symbol "strtok" C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(373) : warning 217: loose indentation C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(373) : error 017: undefined symbol "tmp" C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(376) : warning 217: loose indentation C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(380) : error 017: undefined symbol "tmp" C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(425) : error 017: undefined symbol "tmp2" C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(434) : warning 217: loose indentation C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(512) : warning 217: loose indentation C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(516) : warning 217: loose indentation C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(516) : error 029: invalid expression, assumed zero C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(516) : error 004: function "guerrat" is not implemented C:\Users\john\Desktop\ser 0.3\filterscripts\~Eventos~.pwn(522) : error 030: compound statement not closed at the end of file (started at line 364) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 10 Errors.