Error [FIXING] [REP+] - 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: Error [FIXING] [REP+] (
/showthread.php?tid=564421)
Error [FIXING] [REP+] -
Rog - 21.02.2015
Код:
stock ShowDialog(playerid)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, ""COLOR_RED"Briefcase", ""COLOR_GREEN"Health - "cwhite"5000$\n"COLOR_GREEN"Armour - "cwhite"5500$\n"COLOR_RED"Weapons", "Select", "Cancel");
return 1;
}
which is getting error
Errors :
Код:
D:\Programs\COD - RWW\gamemodes\codrwiv2.pwn(1861) : error 001: expected token: "-string end-", but found "-identifier-"
D:\Programs\COD - RWW\gamemodes\codrwiv2.pwn(1861) : warning 215: expression has no effect
D:\Programs\COD - RWW\gamemodes\codrwiv2.pwn(1861) : error 001: expected token: ";", but found "-string-"
D:\Programs\COD - RWW\gamemodes\codrwiv2.pwn(1861) : warning 215: expression has no effect
D:\Programs\COD - RWW\gamemodes\codrwiv2.pwn(1861) : error 001: expected token: "-string end-", but found "-identifier-"
D:\Programs\COD - RWW\gamemodes\codrwiv2.pwn(1861) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Error [FIXING] [REP+] -
Extremo - 21.02.2015
You have a few too many ".
Remove these and you should be okay.
EDIT:
On closer inspection.. there is a lot more wrong with it than I thought.
You use { } to encode a color if I am not mistaking, so it should look something like:
pawn Код:
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{COLOR_RED}Briefcase", "{COLOR_GREEN}Health - {cwhite}5000$\n{COLOR_GREEN}Armour - {cwhite}5500$\n{COLOR_RED}Weapons", "Select", "Cancel");
Re: Error [FIXING] [REP+] -
CalvinC - 21.02.2015
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
As it states on the wiki, use color embedding.
Example: {FF0000}
Re: Error [FIXING] [REP+] -
Rog - 21.02.2015
can u fix the code for me?
Re: Error [FIXING] [REP+] -
Extremo - 21.02.2015
Look at my reply.. and next time look carefully how the colors are embedded into the string.
Re: Error [FIXING] [REP+] -
CalvinC - 21.02.2015
Quote:
Originally Posted by Rog
can u fix the code for me?
|
Instead of using for example "COLOR_RED", use {FF0000} or whatever normal color you have defined COLOR_RED as.
Do that with all the colors in your dialog.
Re: Error [FIXING] [REP+] -
Rog - 21.02.2015
thanks guyz
Re: Error [FIXING] [REP+] -
Rog - 21.02.2015
removed....