SA-MP Forums Archive
String error - 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)
+--- Thread: String error (/showthread.php?tid=383770)



String error - GrigoGT - 08.10.2012

Hello,i've got this error when i try to compile my gammemode


C:\Documents and Settings\USER\My Documents\Downloads\server\gamemodes\bkp\ALS-RP.pwn(10321) : error 017: undefined symbol "string"
C:\Documents and Settings\USER\My Documents\Downloads\server\gamemodes\bkp\ALS-RP.pwn(10321) : error 017: undefined symbol "string"
C:\Documents and Settings\USER\My Documents\Downloads\server\gamemodes\bkp\ALS-RP.pwn(10321) : error 029: invalid expression, assumed zero
C:\Documents and Settings\USER\My Documents\Downloads\server\gamemodes\bkp\ALS-RP.pwn(10321) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

the line with the error : format(string, sizeof(string), " All Saints Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));


Re: String error - gtakillerIV - 08.10.2012

PHP код:
new string[128];
format(stringsizeof(string), " All Saints Hospital has reported %s as a wanted person."GetPlayerNameEx(playerid)); 
You forgot to make a new string.


Re: String error - GrigoGT - 08.10.2012

Still geting that error...


Re: String error - gtakillerIV - 08.10.2012

Show me your script/code.


Re: String error - Riddick94 - 08.10.2012

No, it can't get the same error. Have you added a 'new string[ArrCount];' properly?


Re: String error - GrigoGT - 08.10.2012

if(PlayerInfo[playerid][pWantedLevel] >= 1)
{

SendClientMessageEx(playerid, COLOR_YELLOW, " Politia a fost alertata ca tu esti cautat!Politistii sunt pe urmele tale..");
format(string, sizeof(string), " All Saints Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
}

This is the line


Re: String error - Riddick94 - 08.10.2012

Put in before the format this:

pawn Код:
new string[128];



Re: String error - gtakillerIV - 08.10.2012

Means you didin't see what I said above then


Re: String error - GrigoGT - 08.10.2012

i'm going crazy with this script,i think it's posesed ))) it gives the same error,anyway thank you both


Re: String error - Riddick94 - 08.10.2012

But in the code which you showed, there's no declared string array.. so?