[Error with /r]
#1

Hello guys, I am receiving this errors for command /r
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(299) : error 017: undefined symbol "string"
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(299) : error 017: undefined symbol "string"
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(299) : error 029: invalid expression, assumed zero
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(299) : fatal error 107: too many error messages on one line

CODE:
Код HTML:
 	if (strcmp("/r", cmdtext, true, 10) == 0)
	{
		if(GetPlayerTeam(playerid) == 1)
		{
			format(string, sizeof(string), "* Radio: %s: %s", pName, string);
			SendPoliceMessage(COLOR_LIGHTBLUE, string);
		}
	return 1;
	}
	return 0;
}
Reply
#2

"string" is undefined.

pawn Код:
if (strcmp("/r", cmdtext, true, 10) == 0)
{
    new string[64];
    if(GetPlayerTeam(playerid) == 1)
    {
        format(string, sizeof(string), "* Radio: %s: %s", pName, string);
        SendPoliceMessage(COLOR_LIGHTBLUE, string);
    }
    return 1;
}
Reply
#3

pawn Код:
if (strcmp("/r", cmdtext, true, 10) == 0)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            new string[ 256 ];
            format(string, sizeof(string), "* Radio: %s: %s", pName, string);
            SendPoliceMessage(COLOR_LIGHTBLUE, string);
        }
    return 1;
    }
    return 0;
}
EDIT: The same thing... More faster...
Reply
#4

C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(301) : error 017: undefined symbol "SendPoliceMessage"
Reply
#5

I have
new PName[MAX_PLAYER_NAME];
forward SendPoliceMessage(color, string[]);
tho..
Reply
#6

All errors fixed. Only
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(301) : error 017: undefined symbol "SendPoliceMessage"
left
Reply
#7

Quote:
Originally Posted by Twinki1993
Посмотреть сообщение
I have
new PName[MAX_PLAYER_NAME];
forward SendPoliceMessage(color, string[]);
tho..
PAWN is case sensitive. PName is not the same as pName.

EDIT:
Quote:
Originally Posted by Twinki1993
Посмотреть сообщение
All errors fixed. Only
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(301) : error 017: undefined symbol "SendPoliceMessage"
left
pawn Код:
public SendPoliceMessage(color, string[])
{
    //...
}
Reply
#8

PHP код:
forward SendPoliceMessage(membercolorstring[]);
public 
SendPoliceMessage(membercolorstring[])
{
    foreach (
Playeri)
    {
        if(
gPlayerLogged[i] == 1)
        {
            if(
GetPlayerTeam(playerid) == 1)
            {
                
SendClientMessage(icolorstring);
            }
        }
    }

PHP код:
if (strcmp("/r"cmdtexttrue10) == 0)
    {
        if(
GetPlayerTeam(playerid) == 1)
        {
            new 
string256 ];
            
format(stringsizeof(string), "* Radio: %s: %s"pNamestring);
            
SendPoliceMessage(COLOR_LIGHTBLUEstring);
        }
    return 
1;
    }
    return 
0;

EDIT: I never read GetPlayerTeam , I've been on a drinking habit these days.
Reply
#9

Quote:
Originally Posted by =WoR=G4M3Ov3r
Посмотреть сообщение
PHP код:
forward SendRadioMessage(membercolorstring[]);
public 
SendPoliceMessage(membercolorstring[]) 
You declare SendRadioMessage as a function yet you create SendPoliceMessage?
Reply
#10

Quote:
Originally Posted by aRoach
Посмотреть сообщение
pawn Код:
if (strcmp("/r", cmdtext, true, 10) == 0)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
                   new string[ 256 ];
            format(string, sizeof(string), "* Radio: %s: %s", pName, string);
            SendPoliceMessage(COLOR_LIGHTBLUE, string);
        }
    return 1;
    }
    return 0;
}
EDIT: The same thing... More faster...
Read this it should help you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)