error 001: expected token: "-string end-", but found "-identifier-"
#1

Was trying something and I need help with some errors, those are the errors I get

Код:
C:\server\gamemodes\fortcarsonroleplay.pwn(16309) : error 001: expected token: "-string end-", but found "-identifier-"
C:\server\gamemodes\fortcarsonroleplay.pwn(16309) : warning 215: expression has no effect
C:\server\gamemodes\fortcarsonroleplay.pwn(16309) : error 001: expected token: ";", but found "-string-"
C:\server\gamemodes\fortcarsonroleplay.pwn(16309) : warning 215: expression has no effect
C:\server\gamemodes\fortcarsonroleplay.pwn(16309) : error 017: undefined symbol "pActiveOffense"
C:\server\gamemodes\fortcarsonroleplay.pwn(16309) : fatal error 107: too many error messages on one line
Код:
 format(string, sizeof(string), "[PD Database:] "COLOR_WHITE"%s", PlayerInfo[criminal][pActiveListings],string);
		SCM(playerid, COLOR_PD, string);
Reply
#2

You cannot use integers in-between a string - you should have defined it as following:
pawn Код:
#define COL_WHITE "{FFFFFF}"
and use COL_WHITE instead. But there is a problem, you have 1 specifier (%s) and 2 arguments (PlayerInfo[criminal][pActiveListings], string)

If you only want to concatenate the active listings and just that, you can also use:
pawn Код:
string = "[PD Database:] " COL_WHITE;
strcat(string, PlayerInfo[criminal][pActiveListings]);
Reply
#3

" missing

#define COLOR_WHITE "{FFFFFF}"

format(string, sizeof(string), "[PD Database:] "COLOR_WHITE""%s", PlayerInfo[criminal][pActiveListings],string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)