HELP / Error when I compile (Onplayertext)
#1

Код:
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
Reply
#2

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.
Reply
#3

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
Reply
#4

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];
Reply
#5

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"
Reply
#6

Seriously, you should first start with the PAWN basics.
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)