error 037: invalid string (possibly non-terminated string) - Patrick - 06.03.2013
Hello guys everytime i compile that error below shows. i tried putting the string value but i still same so. i tried also making static const and make it seperate but it still the same. so i can't think of any solution anymore. so i asked here on forum. hope someone could help me!
Error
pawn Код:
\IEG LSCNR\gamemodes\lscnr_mysql.pwn(2718) : error 037: invalid string (possibly non-terminated string)
\IEG LSCNR\gamemodes\lscnr_mysql.pwn(2718) : warning 215: expression has no effect
\IEG LSCNR\gamemodes\lscnr_mysql.pwn(2718) : error 001: expected token: ";", but found "-identifier-"
\IEG LSCNR\gamemodes\lscnr_mysql.pwn(2718) : error 017: undefined symbol "Searches"
\IEG LSCNR\gamemodes\lscnr_mysql.pwn(2718) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Command
pawn Код:
#define yellow "{FFE352}"
#define white "{FFFFFF}"
CMD:cmds(playerid,params[])
{
new string[1256];
if(gTeam[playerid] == TEAM_POLICE && GetPlayerSkin(playerid) != 286)
{
static const
form0[] = ""yellow"/cuff - "white"Cuffs a player.\n\
"yellow"/uncuff - "white"Uncuffs a player.\n\
"yellow"/pu - "white"Asks a suspect to pull over.\n\
"yellow"/fine - "white"Issues a ticket to a player.\n\
"yellow"/suspect - "white"Gives a player a wanted level.\n\
"yellow"/search - "white"Searches a player.\n\",
form1[] = ""yellow"/m - "white"Megaphone.\n\
"yellow"/ar - "white"Arrests a player.\n\
"yellow"/detain - "white"Detains a player.\n\
"yellow"/dropoff - "white"Arrests a detained player\n\
"yellow"@ (message) - "white"Sends message through Police Radio"
;
format( string, sizeof(string), "%s%s", form0, form1);
ShowPlayerDialog(playerid, INFO, DIALOG_STYLE_MSGBOX, "{FFE352}POLICE COMMANDS", string, "Close", "" );
return 1;
}
Re: error 037: invalid string (possibly non-terminated string) -
DiGiTaL_AnGeL - 06.03.2013
Where do you get the error? Comment in those codes the line with the errors.
Re: error 037: invalid string (possibly non-terminated string) - Patrick - 06.03.2013
i get the error on this line:
pawn Код:
"yellow"/search - "white"Searches a player.\n\",
Re: error 037: invalid string (possibly non-terminated string) -
Jstylezzz - 06.03.2013
pawn Код:
"yellow"/search - "white"Searches a player.\n\",
You forgot the " to close the string.
Try
pawn Код:
"yellow"/search - "white"Searches a player.\n\"",
Re: error 037: invalid string (possibly non-terminated string) - Patrick - 06.03.2013
2 error Jari_Johnson*
pawn Код:
\IEG LSCNR\gamemodes\lscnr_mysql.pwn(2478) : error 037: invalid string (possibly non-terminated string)
\IEG LSCNR\gamemodes\lscnr_mysql.pwn(2478 -- 2479) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
on this line
pawn Код:
"yellow"@ (message) - "white"Sends message through Police Radio""//2478
;//2479
Re: error 037: invalid string (possibly non-terminated string) -
Jstylezzz - 06.03.2013
Same thing as before, you forgot the "
pawn Код:
"yellow"@ (message) - "white"Sends message through Police Radio"
Has to be
pawn Код:
"yellow"@ (message) - "white"Sends message through Police Radio""
Re: error 037: invalid string (possibly non-terminated string) -
Catalyst- - 06.03.2013
Ignore:
You have to use '#' when inserting a defined color into a string...
pawn Код:
CMD:cmds(playerid,params[])
{
new string[1256];
if(gTeam[playerid] == TEAM_POLICE && GetPlayerSkin(playerid) != 286)
{
new const
form0[] = ""yellow"/cuff - "white"Cuffs a player.\n\
"yellow"/uncuff - "white"Uncuffs a player.\n\
"yellow"/pu - "white"Asks a suspect to pull over.\n\
"yellow"/fine - "white"Issues a ticket to a player.\n\
"yellow"/suspect - "white"Gives a player a wanted level.\n\
"yellow"/search - "white"Searches a player.\n", // Problem was that you had a '\' here
form1[] = ""yellow"/m - "white"Megaphone.\n\
"yellow"/ar - "white"Arrests a player.\n\
"yellow"/detain - "white"Detains a player.\n\
"yellow"/dropoff - "white"Arrests a detained player\n\
"yellow"@ (message) - "white"Sends message through Police Radio"
;
format( string, sizeof(string), "%s%s", form0, form1);
ShowPlayerDialog(playerid, INFO, DIALOG_STYLE_MSGBOX, "{FFE352}POLICE COMMANDS", string, "Close", "" );
return 1;
}
Re: error 037: invalid string (possibly non-terminated string) - Patrick - 06.03.2013
@
****** i dont know why. i just quoted it on
[ pawn ][ / pawn ] and as you said. it show's blue. but on pawno it doesn't show as blue to me. it show's black
EDIT
@Catalyst- thank you for your edited code! works!