String error
#1

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));
Reply
#2

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.
Reply
#3

Still geting that error...
Reply
#4

Show me your script/code.
Reply
#5

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

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
Reply
#7

Put in before the format this:

pawn Код:
new string[128];
Reply
#8

Means you didin't see what I said above then
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)