22.06.2010, 01:17
The script:
The errors:
Код:
#include <a_samp> #include <a_npc> new MeanMSG[][] = { "What kind of stunt are you trying to pull?", "Fuck off.", "Your an asshole.", "Go fuck yourself!", "Screw yourself!" }; new QuestionMSG[][] = { "What kind of stunt are you trying to pull?", "What the fuck is that?", "I dont have that.", "Sorry, i dont have it." }; public OnNPCModeInit() { print("NPC script loaded"); return 1; } public OnNPCModeExit() { print("NPC script unloaded"); return 1; } public OnPlayerText(playerid, text[]) { new meanMSG = random(sizeof(MeanMSG)); new questionMSG = random(sizeof(QuestionMSG)); new Float:X,Float:Y,Float:Z; GetMyPos(X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,10,X,Y,Z)) { if (strfind(text, "menu") != -1 || strfind(text, "food") != -1 || strfind(text, "sell") != -1) { SendChat("I have hotdogs, corndogs, suasages and hamburgers. Everything is 2 bucks."); } if (strfind(text, "fuck you") != -1 || strfind(text, "asshole") != -1 || strfind(text, "doosh") != -1 || strfind(text, "cunt") != -1 || strfind(text, "fucker") != -1 || strfind(text, "fag") != -1 || strfind(text, "bitch") != -1 || strfind(text, "ho") != -1) { SendChat(MeanMSG[meanMSG]); } if(GetPlayerMoney(playerid) >= 2) { if (strfind(text, "hotdog") != -1) { SendChat("Here is your hotdog. Thank you for your business!"); GivePlayerMoney(playerid, -2); SetPlayerHealth(playerid, 100); } else if (strfind(text, "sausage") != -1) { SendChat("Here is your sausage. Thank you for your business!"); GivePlayerMoney(playerid, -2); SetPlayerHealth(playerid, 100); } else if (strfind(text, "corndog") != -1) { SendChat("Here is your corndog. Thank you for your business!"); GivePlayerMoney(playerid, -2); SetPlayerHealth(playerid, 100); } else if (strfind(text, "burger") != -1) { SendChat("Here is your burger. Thank you for your business!"); GivePlayerMoney(playerid, -2); SetPlayerHealth(playerid, 100); } else { SendChat(QuestionMSG[questionMSG]); } } else { SendChat("Im sorry, you dont have enough money."); } } return 1; }
Код:
C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(23) : warning 235: public function lacks forward declaration (symbol "OnNPCModeInit") C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(29) : warning 235: public function lacks forward declaration (symbol "OnNPCModeExit") C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(40) : error 017: undefined symbol "GetMyPos" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(45) : error 017: undefined symbol "SendChat" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(49) : error 017: undefined symbol "SendChat" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(55) : error 017: undefined symbol "SendChat" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(61) : error 017: undefined symbol "SendChat" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(67) : error 017: undefined symbol "SendChat" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(73) : error 017: undefined symbol "SendChat" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(79) : error 017: undefined symbol "SendChat" C:\Users\Administrator\Documents\SA-MP Server\npcmodes\Hotdogs.pwn(84) : error 017: undefined symbol "SendChat" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors.