20.10.2009, 17:21
Hi all, I have run into a problem and ive been trying to solve it for past 2 hours..
All of my bots work fine as a single filterscript for each but if i try to put them all into a single one It gives 29 warnings and all bots stay at spawn... I hope someone could help me, Thanks!
Here is the code:
And the Warnings:
All of my bots work fine as a single filterscript for each but if i try to put them all into a single one It gives 29 warnings and all bots stay at spawn... I hope someone could help me, Thanks!
Here is the code:
Код:
#include <a_samp> #define FILTERSCRIPT new npcname; new MyFirstNPCVehicle1; //Global variable new MyFirstNPCVehicle2; //Global variable new MyFirstNPCVehicle3; //Global variable new MyFirstNPCVehicle4; //Global variable new MyFirstNPCVehicle5; //Global variable new MyFirstNPCVehicle6; //Global variable new MyFirstNPCVehicle7; //Global variable new MyFirstNPCVehicle8; //Global variable new MyFirstNPCVehicle9; //Global variable new MyFirstNPCVehicle10; //Global variable public OnFilterScriptInit() { print("BK Bots"); ConnectNPC("amber","bkambu"); ConnectNPC("pilot","bkaudi"); ConnectNPC("bkdrift","bkc"); ConnectNPC("idiot","bkcar"); ConnectNPC("kamikaze","bkcraz"); ConnectNPC("kamiz","bkkaz"); ConnectNPC("kamiz2","bkkaz2"); ConnectNPC("cruiz","bkzr"); ConnectNPC("sam","btaxi"); ConnectNPC("sam2","btaxi2"); MyFirstNPCVehicle1 = CreateVehicle(416, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle2 = CreateVehicle(487, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle3 = CreateVehicle(562, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle4 = CreateVehicle(412, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle5 = CreateVehicle(553, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle6 = CreateVehicle(432, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle7 = CreateVehicle(432, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle8 = CreateVehicle(477, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle9 = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); MyFirstNPCVehicle10 = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000); return 1; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name. if(!strcmp(npcname, "amber", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, MyFirstNPCVehicle1, 0); //Putting the NPC into the vehicle we created for it. return 1; } if(!strcmp(npcname, "pilot", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle2, 0); return 1; } return 1; if(!strcmp(npcname, "bkdrift", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle3, 0); return 1; } return 1; if(!strcmp(npcname, "idiot", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle4, 0); return 1; } return 1; if(!strcmp(npcname, "kamikaze", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle5, 0); return 1; } return 1; if(!strcmp(npcname, "kamiz", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle6, 0); return 1; } return 1; if(!strcmp(npcname, "kamiz2", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle7, 0); return 1; } return 1; if(!strcmp(npcname, "cruiz", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle8, 0); return 1; } return 1; if(!strcmp(npcname, "sam", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle9, 0); return 1; } return 1; if(!strcmp(npcname, "sam2", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle10, 0); return 1; } return 1; } //Other stuff for normal players goes here! return 1; }
Код:
C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(20) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(30) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(40) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(48) : warning 219: local variable "npcname" shadows a variable at a preceding level C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(62) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(62) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(67) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(69) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(69) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(74) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(76) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(76) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(81) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(83) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(83) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(88) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(90) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(90) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(95) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(97) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(97) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(102) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(104) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(104) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(109) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(111) : warning 225: unreachable code C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(111) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(116) : warning 217: loose indentation C:\Users\Bogdan K\Desktop\My Stuff\Server\Sa-mp 0.3a server bk bot\filterscripts\bkbots.pwn(121) : warning 203: symbol is never used: "npcname" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 29 Warnings.