Anti Spam Help
#1

The errors i get from below script are;
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.

Line 178:
Quote:

if(pInfo[playerid][Spamer] == 1) {

Please me out guys & gals

Top of script
Код:
//==========ANTI SPAM===============//
new PlayerWritedMessages[MAX_PLAYERS];
forward AntiSpamTimer(playerid);
new SpamTimer[MAX_PLAYERS];
forward RemoveSpam();
#define ALLOW_MESSAGES 5
//=================================//
OnGameModeInit:
Код:
SetTimer("RemoveSpam", 4000, true);
OnPlayerText:
Код:
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;
}

Reply
#2

Try change pInfo to PlayerInfo on that line.
Reply
#3

Nope that didnt work. Thanks for trying.
Reply
#4

Uh, have you got something like this:

pawn Код:
enum lulz
{
   lulz1,
   lulz2,
   lulz3,
   lulz4, blah, blah
}
new pInfo[MAX_PLAYERS][lulz];
Reply
#5

I'm kinda new to this so can you help me out a bit more then just 'lulz'
Reply
#6

Try searching for tutorials im sure there is some out there?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)