SA-MP Forums Archive
Some Errors ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some Errors ! (/showthread.php?tid=237295)



Some Errors ! - Roomeo - 09.03.2011

pawn Код:
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(32) : error 010: invalid function or declaration
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : error 017: undefined symbol "muted"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : warning 215: expression has no effect
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : error 001: expected token: ";", but found "]"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : error 029: invalid expression, assumed zero
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
script
pawn Код:
32)new muted[MAX_PLAYERS];
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
394)    if(muted[playerid]) return 0;
    return 1;
}



Re: Some Errors ! - Skylar Paul - 09.03.2011

If I remember correctly, that function was removed, however if you still feel like you need it..

pawn Код:
public OnplayerPrivmsg(playerid, recieverid, text[])
{
new muted[MAX_PLAYERS] = 0; //Put this on the top of your script so you can use it in your mute command aswell.
if(muted[playerid] == 1) return 0;
return 1;
}
Of course you'll need to create a mute command that sets the variable muted[playerid] to 1.


Re: Some Errors ! - HyperZ - 09.03.2011

Put this under include's:
pawn Код:
new muted[MAX_PLAYERS];
OnPlayerPrivmsg:
pawn Код:
public OnplayerPrivmsg(playerid, recieverid, text[])
{
    if(muted[playerid] == 1) return 0;
    return 1;
}
Edit: Too late, and This callback was removed in SA-MP 0.3.


Re: Some Errors ! - alpha500delta - 09.03.2011

1st: OnPlayerPrivmsg was removed in SA:MP 0.3, you cannot use it anymore, you can delete it

2nd: try

pawn Код:
new muted[MAX_PLAYERS] = 0;

public SomeCallback(playerid)
{
    if(muted[playerid] == 1) return SOMETHING;
    return 1;
}
When you /mute be sure to put this

pawn Код:
muted[playerid] = ;
Oh darn it, it seems I'm slow


Re: Some Errors ! - Roomeo - 09.03.2011

Guys i'm Really Sorry the problem was i just pressed the right printF button so it was on the top i removed it and done

and i added
pawn Код:
public OnPlayerText(playerid, text[])
{
if(muted[playerid] == 1) return 0;
return 1;
}
it works but onplayerprivmsg also worked :P