Error [FIXING] [REP+]
#1

Код:
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.
Reply
#2

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

https://sampwiki.blast.hk/wiki/ShowPlayerDialog

As it states on the wiki, use color embedding.
Example: {FF0000}
Reply
#4

can u fix the code for me?
Reply
#5

Look at my reply.. and next time look carefully how the colors are embedded into the string.
Reply
#6

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

thanks guyz
Reply
#8

removed....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)