Help me solve this error
#1

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

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

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

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


1 Error.
Reply
#5

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

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)