[help] Dialog
#1

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

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

You have to add another button after ok
Quote:

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

to like
Quote:

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

Reply
#4

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)