SA-MP Forums Archive
Y_INI - 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: Y_INI (/showthread.php?tid=329438)



Y_INI - Roddan - 28.03.2012

Hello at line 91 i get those errors:

Код:
error 001: expected token: "-string end-", but found "-identifier-"
warning 215: expression has no effect
error 001: expected token: ";", but found "-string-"
warning 215: expression has no effect
error 001: expected token: "-string end-", but found "-identifier-"
fatal error 107: too many error messages on one line
http://pastebin.com/MifsTc5M


Re: Y_INI - The__ - 28.03.2012

pawn Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Server name", "Welcome back to server name\n\nPlease enter your password below to login.", "Login", "Cancel");
This is mine, try this, replace it, just change ' server name ' to your server.


Re: Y_INI - Roddan - 28.03.2012

Our is different and i'm new to scripting, this is mine.

pawn Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
pawn Код:
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_WHITE"Registering...",""COLOR_WHITE"Type your password below to register a new account.","Register","Quit");



Re: Y_INI - DanL - 28.03.2012

You're trying to concatenate COLOR_WHITE and so forth in, it doesn't work like that. Color embedding works with {HEX VALUE} so for example...

Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password below to login.","Login","Quit");
EDIT: You also have COLOR_WHITE defined as 0xFFFFFFFF, Color embedding needs the HEX Value.


Re: Y_INI - Roddan - 28.03.2012

Quote:

You also have COLOR_WHITE defined as 0xFFFFFFFF, Color embedding needs the HEX Value.

Will it work to use: 0x99CEFFFF?

I have seen other Gamemodes use this.


Re: Y_INI - DanL - 28.03.2012

Okay so for example,

You want to add color to the strings within your dialog.

Quote:

ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password below to login.","Login","Quit");

That will correctly output the word "Login" as white and "Type your password below..." as white.

To embed colors you need to use two curly braces '{HEX VALUE HERE}' before the characters you're trying to color.

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


Re: Y_INI - Roddan - 28.03.2012

So how can i use colors like this?

pawn Код:
#define COLOR_UMED 0x99CEFFFF



Re: Y_INI - The__ - 28.03.2012

{CEFFFF} without number and 0x, as I remember.

EDIT :

http://www.2createawebsite.com/build/hex-colors.html

use this.