SA-MP Forums Archive
Pawno : error 017: undefined symbol "text" - 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)
+--- Thread: Pawno : error 017: undefined symbol "text" (/showthread.php?tid=544604)



Pawno : error 017: undefined symbol "text" - Hades12 - 02.11.2014

#include <a_samp>
#include <ZCMD>
#include <DOF2>
#include <sscanf2>
#include <ppc_deftexts>

#if defined FILTERSCRIPT


#endif



public OnPlayerConnect(playerid)
{
if(IsPlayerAdmin(playerid)== 2) //troque pela variavel de admin
{
new string[256];
format(string,sizeof(string),"[ID:%d][ADM-RCON] %s ",playerid,text);
SendPlayerMessageToAll(playerid,string);
return false;
}
//outros c?digos.
return false;
}


---------------------------------------------------------------------------------------------------------------

desculpa ae, é que não entendo muito de pawno


Re: Pawno : error 017: undefined symbol "text" - [HiC]TheKiller - 02.11.2014

The error is pretty much exactly what it says. The variable text needs to be created and set to something. It would probably be easier if you asked in http://forum.sa-mp.com/forumdisplay.php?f=34 section though.


Re: Pawno : error 017: undefined symbol "text" - M0HAMMAD - 02.11.2014

we don't have text on OnPlayerConnect !!!
you must add this to OnPlayerText.
pawn Код:
public OnPlayerText(playerid, text[])
and when you want drop the pawn code in forum. before code add [PAWN] and after that [/ PAWN].
but you must delete the space between / and PAWN. will be /PAWN
sorry for my bad english.


Respuesta: Pawno : error 017: undefined symbol "text" - !R1Ch@rD! - 02.11.2014

try?

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsPlayerAdmin(playerid)== 2) //troque pela variavel de admin
    {
    new string[256];
    format(string,sizeof(string),"[ID:%d][ADM-RCON] %s ",playerid,text);
    SendPlayerMessageToAll(playerid,string);
    return false;
    }
}