SA-MP Forums Archive
[help] Dialog - 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: [help] Dialog (/showthread.php?tid=431136)



[help] Dialog - Areax - 16.04.2013

Hello!

I was creating a login dialog, but i get 3 warnings...

Code:

PHP код:
   format(stringsizeof(string), ">>Welcome back, %s!<<\n[INFORMATIONS]:\n[Admin Level]: %d\n[Vip Level]: %d\n[Score]: %d\n[Money]: %d","Ok",""namegPlayerInfo[playerid][PLAYER_LEVEL], gPlayerInfo[playerid][PLAYER_VIP], GetPlayerScore(playerid), GetPlayerMoney(playerid));
   
ShowPlayerDialog(playerid117DIALOG_STYLE_MSGBOXstring); 
Warnings:

PHP код:
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(609) : warning 202number of arguments does not match definition
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(609) : warning 202number of arguments does not match definition
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(609) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
3 Warnings

Warnings are on this line:

PHP код:
   ShowPlayerDialog(playerid117DIALOG_STYLE_MSGBOXstring); 
Thank you


Re: [help] Dialog - [XST]O_x - 16.04.2013

pawn Код:
format(string, sizeof(string), ">>Welcome back, %s!<<\n[INFORMATIONS]:\n[Admin Level]: %d\n[Vip Level]: %d\n[Score]: %d\n[Money]: %d", name, gPlayerInfo[playerid][PLAYER_LEVEL], gPlayerInfo[playerid][PLAYER_VIP], GetPlayerScore(playerid), GetPlayerMoney(playerid));
ShowPlayerDialog(playerid, 117, DIALOG_STYLE_MSGBOX, "Title", string, "button1", "button2");



Re: [help] Dialog - RandomDude - 16.04.2013

You have to add another button after ok
Quote:

: %d","Ok","",

to like
Quote:

: %d","Ok","Cancel",




Re: [help] Dialog - Areax - 16.04.2013

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
ShowPlayerDialog(playerid, 117, DIALOG_STYLE_MSGBOX, "Title", string, "button1", "button2");
Thanks REP+


Re: [help] Dialog - [XST]O_x - 16.04.2013

Quote:
Originally Posted by Areax
Посмотреть сообщение
Thanks REP+
You also formatted the string wrongfully... I edited the message, so edit your format() function additionally.


Re: [help] Dialog - Areax - 16.04.2013

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
You also formatted the string wrongfully... I edited the message, so edit your format() function additionally.
Sorry, I can't give you REP+ "You must spread some Reputation around before giving it to [XST]O_x again."