[Error with /r] -
Twinki1993 - 12.11.2011
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;
}
Re: [Error with /r] -
Juniior - 12.11.2011
"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;
}
Re: [Error with /r] -
aRoach - 12.11.2011
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...
Re: [Error with /r] -
Twinki1993 - 12.11.2011
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(301) : error 017: undefined symbol "SendPoliceMessage"
Re: [Error with /r] -
Twinki1993 - 12.11.2011
I have
new PName[MAX_PLAYER_NAME];
forward SendPoliceMessage(color, string[]);
tho..
Re: [Error with /r] -
Twinki1993 - 12.11.2011
All errors fixed. Only
C:\Users\Maki\Desktop\TDM\gamemodes\TDM.pwn(301) : error 017: undefined symbol "SendPoliceMessage"
left
Re: [Error with /r] -
Juniior - 12.11.2011
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[])
{
//...
}
Re: [Error with /r] -
=WoR=G4M3Ov3r - 12.11.2011
PHP код:
forward SendPoliceMessage(member, color, string[]);
public SendPoliceMessage(member, color, string[])
{
foreach (Player, i)
{
if(gPlayerLogged[i] == 1)
{
if(GetPlayerTeam(playerid) == 1)
{
SendClientMessage(i, color, string);
}
}
}
}
PHP код:
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: I never read GetPlayerTeam

, I've been on a drinking habit these days.
Re: [Error with /r] -
Juniior - 12.11.2011
Quote:
Originally Posted by =WoR=G4M3Ov3r
PHP код:
forward SendRadioMessage(member, color, string[]);
public SendPoliceMessage(member, color, string[])
|
You declare SendRadioMessage as a function yet you create SendPoliceMessage?
Re: [Error with /r] -
Pharrel - 12.11.2011
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