[HELP] What is wrong with this script?
#1

Код:
  if(strcmp("/ra", cmdtext, true))
	{
    if(cmdtext[3] == 0) return SendClientMessage(playerid, 0xFF0000FF, "/ra [text]");
    new playername[26];
    GetPlayerName(playerid, playername, 26);
    format(string, sizeof(string), "Police Radio: %s > %s **over", playername, cmdtext[3]);
    for(new i=0;i<MAX_PLAYERS;i++)
    if(GetPlayerTeam(playerid) != 9) return SendClientMessage(playerid,0xFF0000FF, "You are not a Police Officer.");
    return 1;
	}
Here is the errors:

Код:
C:\Program\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\thestreets-rpg.pwn(1108) : error 017: undefined symbol "string"
C:\Program\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\thestreets-rpg.pwn(1108) : error 017: undefined symbol "string"
C:\Program\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\thestreets-rpg.pwn(1108) : error 029: invalid expression, assumed zero
C:\Program\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\thestreets-rpg.pwn(1108) : fatal error 107: too many error messages on one line
The script is a Police radio.

Thanks
Reply
#2

You need to define 'string'.

pawn Код:
new string[128];
And you're not sending the message after you're formating it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)