25.06.2011, 19:58
Okay, I'm trying to make a Newbie Chat filterscript off of something I'm looking at on the forums. I keep coming up with this error that's telling me that it's finding the end of script, and it's looking for "#endif". I put the #endif at the end of my filterscript, and it's still looking for it the "#endif" at the next line. I'm not understanding this.
Here's the script
And my error message:
Here's the script
Код:
new bool:NewbieChat[MAX_PLAYERS]; public OnPlayerConnect(playerid) { newbie[playerid] = true; return 1; } public OnFilterScriptInit() { NewbieChat == true; return 1; } #if UseNewbieChat == true if(!strcmp(cmdtext,"/n",true,2)) { if(PlayerInfo[playerid][Newbie] ==0 return SendClientMessage(playerid,0xff000000, "You are no longer labeled as a Newbie!"); //Official newb/pwn checker. :P 8=====D~~ new name[MAX_PLAYER_NAME]; new string[256]; new text[128], string[128], playerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, playerName, sizeof(name)); for(new i=0, i < MAX_PLAYERS; i++) { if(PlayerInfo[i][Newbie] ==1) { format(string,sizeof(string), "[Newbie Chat] %s: %s",name,cmdtext[3]); SendClientMessage(i,COLOR_NGREEN,string); } } return 1; } if(!strcmp(cmdtext, "/nccontrol", true, 9)) { if(NewbieChat == true) { SendClientMessage(playerid, COLOR_NRED, "{ffffff}[Server:] The Newbie Chat has been {ff0000}DISABLED {ffffff}by an administrator."); NewbieChat == false; } else { SendClientMessage(playerid, COLOR_NGREEN, "{ffffff}[Server:] The Newbie Chat has been {00ff00}ENABLED {ffffff}by an administraotr."); NewbieChat == true; } return 1; } #endif
Код:
C:\Users\Bierstedt\Desktop\Noob Chat.pwn(74) : error 001: expected token: "#endif", but found "-end of file-" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase