25.08.2009, 12:09
The errors i get from below script are;
Line 178:
Please me out guys & gals
Top of script
OnGameModeInit:
OnPlayerText:
Quote:
C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : error 017: undefined symbol "pInfo" C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : warning 215: expression has no effect C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : error 001: expected token: ";", but found "]" C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : error 029: invalid expression, assumed zero C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : fatal error 107: too many error messages on one line 4 Errors. |
Quote:
if(pInfo[playerid][Spamer] == 1) { |
Top of script
Код:
//==========ANTI SPAM===============// new PlayerWritedMessages[MAX_PLAYERS]; forward AntiSpamTimer(playerid); new SpamTimer[MAX_PLAYERS]; forward RemoveSpam(); #define ALLOW_MESSAGES 5 //=================================//
Код:
SetTimer("RemoveSpam", 4000, true);
Код:
if(pInfo[playerid][Spamer] == 1) { SendClientMessage(playerid,white,"You need to wait, because you are flooder!"); return false; } PlayerWritedMessages[playerid] += 1; if(PlayerWritedMessages[playerid] >= ALLOW_MESSAGES) { pInfo[playerid][Spamer] = 1; PlayerWritedMessages[playerid] = 0; SpamTimer[playerid] = SetTimerEx("AntiSpamTimer",10000,false,"d",playerid); }
Код:
public AntiSpamTimer(playerid) { PlayerWritedMessages[playerid] = 0; KillTimer(SpamTimer[playerid]); pInfo[playerid][Spamer] = 0; return 1; } public RemoveSpam() { for(new z = INVALID_PLAYER_ID; z < MAX_PLAYERS; z++) { if(pInfo[z][Spamer] != 1) { KillTimer(SpamTimer[z]); PlayerWritedMessages[z] = 0; } } return 1; } public RemoveSpam() { for(new z = 0; z < MAX_PLAYERS; z++) { if(pInfo[z][Spamer] != 1) { KillTimer(SpamTimer[z]); PlayerWritedMessages[z] = 0; } } return 1; }