SA-MP Forums Archive
Help me solve this error - 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 me solve this error (/showthread.php?tid=250586)



Help me solve this error - Andregood - 23.04.2011

Well I basically got this;

Код:
COMMAND:b(playerid, params[])
{
ProxDetector(20.0, playerid,string,COLOR,COLOR,COLOR,COLOR,COLOR);
{
    new pName[MAX_PLAYER_NAME], string[128];
    if(sscanf(params, "s[128]", params[0])) return SendClientMessage(playerid, -1, "Usage: /b <message>");
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "(( %s says: %s", pName, params[0]); // What does B do? I dont know about RP, but you can enter it here
    SendClientMessageToAll(-1, string); // Message goes to all or?
    return 1;
}
And I am getting this error
Код:
D:\SAMP Server\gamemodes\Vampires.pwn(360) : error 017: undefined symbol "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Help would be appreciated.


Re: Help me solve this error - Katros - 23.04.2011

PHP код:
COMMAND:b(playeridparams[])
{
    new 
pName[MAX_PLAYER_NAME], string[128];
    if(
sscanf(params"s[128]"params[0])) return SendClientMessage(playerid, -1"Usage: /b <message>");
    
GetPlayerName(playeridpNamesizeof(pName));
    
format(stringsizeof(string), "(( %s says: %s"pNameparams[0]); // What does B do? I dont know about RP, but you can enter it here
    
ProxDetector(20.0playerid,string,COLOR,COLOR,COLOR,COLOR,COLOR);
    return 
1;

perfect work here!


Re: Help me solve this error - xir - 23.04.2011

pawn Код:
COMMAND:b(playerid, params[])
{
    new pName[MAX_PLAYER_NAME], string[128];
    if(sscanf(params, "s[128]", params[0])) return SendClientMessage(playerid, -1, "Usage: /b <message>");
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "(( %s says: %s", pName, params[0]); // What does B do? I dont know about RP, but you can enter it here
    ProxDetector(20.0, playerid,string,COLOR,COLOR,COLOR,COLOR,COLOR);
    return 1;
}



Re: Help me solve this error - Andregood - 23.04.2011

Код:
D:\SAMP Server\gamemodes\Vampires.pwn(364) : error 017: undefined symbol "COLOR"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Help me solve this error - STMatt - 23.04.2011

:facepalm: don't you know english? It says UNDEFINED , it means you didn't DEFINE the COLOR !


Re: Help me solve this error - Andregood - 23.04.2011

I obviously know english so shut up please, and I did define it, it simply says the same as it previously did when I name it after any color that I have defined.



I got it to work finally, there were some brackets causing it, my fault. Sorry!