SA-MP Forums Archive
HELP / Error when I compile (Onplayertext) - 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: HELP / Error when I compile (Onplayertext) (/showthread.php?tid=112726)



HELP / Error when I compile (Onplayertext) - waim - 09.12.2009

Код:
public OnPlayerText(playerid, text[])
{
  // for example, if the variable mute[playerid] is set to 1, it will
  // stop the text from processing, otherwise it allows it to be sent.
  if(mute[playerid] == 1) return 0;
  return 1;
}
and these are the errors
Код:
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(124) : error 017: undefined symbol "mute"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(124) : warning 215: expression has no effect
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(124) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(124) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(124) : fatal error 107: too many error messages on one line



Re: HELP / Error when I compile (Onplayertext) - Joe Staff - 09.12.2009

Copy and pasting someone else's work won't work properly unless you get all the code pertaining to the function you want. For example, for this to work make sure you grab the variables and commands created specifically for muting a player.


Re: HELP / Error when I compile (Onplayertext) - waim - 09.12.2009

Quote:
Originally Posted by Joe Staff
Copy and pasting someone else's work won't work properly unless you get all the code pertaining to the function you want. For example, for this to work make sure you grab the variables and commands created specifically for muting a player.
No ! I dont copy/past work someone I show that's code in https://sampwiki.blast.hk/wiki/OnPlayerText


Re: HELP / Error when I compile (Onplayertext) - Abernethy - 09.12.2009

Quote:
Originally Posted by waim
Quote:
Originally Posted by Joe Staff
Copy and pasting someone else's work won't work properly unless you get all the code pertaining to the function you want. For example, for this to work make sure you grab the variables and commands created specifically for muting a player.
No ! I dont copy/past work someone I show that's code in https://sampwiki.blast.hk/wiki/OnPlayerText
He means that exactly. Add this to the top of your script.
pawn Код:
new mute[MAX_PLAYERS];



Re: HELP / Error when I compile (Onplayertext) - waim - 09.12.2009

He means that exactly. Add this to the top of your script.
pawn Код:
new mute[MAX_PLAYERS];
[/quote]
when I put this
Код:
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(124) : warning 204: symbol is assigned a value that is never used: "mute"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(139) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(140) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(141) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(142) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(143) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(143) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(144) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(145) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(146) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(147) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(148) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(149) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(150) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(151) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(152) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(153) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(154) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(155) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(156) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(157) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(158) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Administrateur\Mes documents\SAMP\DMwaim.pwn(159) : error 017: undefined symbol "dcmd"



Re: HELP / Error when I compile (Onplayertext) - Correlli - 09.12.2009

Seriously, you should first start with the PAWN basics.


Re: HELP / Error when I compile (Onplayertext) - waim - 09.12.2009

Quote:
Originally Posted by Don Correlli
Seriously, you should first start with the PAWN basics.
I did not understand my brother as possible to clarify because I started from PAWNO