SA-MP Forums Archive
[HELP] What is wrong with this script? - 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] What is wrong with this script? (/showthread.php?tid=81044)



[HELP] What is wrong with this script? - FreddeN - 07.06.2009

Код:
  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


Re: [HELP] What is wrong with this script? - Correlli - 07.06.2009

You need to define 'string'.

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