ShowPlayDialog , DIALOG_STYLE_MSGBOX -
AdamCooper - 20.06.2013
Is this possible to add
in DIALOG_STYLE_MSGBOX
example :
pawn Код:
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_MSGBOX,"Mobile Data Control","Convicts:\n[%s]","Accept","Cancel", PlayerInfo[x][crimereason]);
Right now I'm getting error "warning 202: number of arguments does not match definition"
Any ideas? Thanks!
Respuesta: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
JustBored - 20.06.2013
No, you have to format it
pawn Код:
format(string, sizeof(string), "Convicts:\n[%s]", PlayerInfo[x][crimereason]
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_MSGBOX,"Mobile Data Control",string,"Accept","Cancel");
Re: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
SwisherSweet - 20.06.2013
Код:
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_MSGBOX,"Mobile Data Control", "Convicts:\n %s", "Accept", "Cancel", PlayerInfo[x][crimereason]);
Re: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
Scenario - 20.06.2013
Quote:
Originally Posted by Aveger
Код:
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_MSGBOX,"Mobile Data Control", "Convicts:\n %s", "Accept", "Cancel", PlayerInfo[x][crimereason]);
|
No, that's wrong.
JustBored has the right idea! %s, %d, %i, %f are all "placeholders" as I like to call them. You need to use format in order to actually sort out what should be substituted in for each of them.
Re: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
AdamCooper - 20.06.2013
Yup that's smart I will give it a try and update here.
Thanks
Re: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
SwisherSweet - 20.06.2013
Quote:
Originally Posted by RealCop228
No, that's wrong.
JustBored has the right idea! %s, %d, %i, %f are all "placeholders" as I like to call them. You need to use format in order to actually sort out what should be substituted in for each of them.
|
im still learning myself...
Re: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
AdamCooper - 20.06.2013
OK, worked.
Thanks for the help guys.
Re: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
Scenario - 20.06.2013
Quote:
Originally Posted by Aveger
im still learning myself...
|
I figured as much. I'm just letting you know you're wrong. If I wanted to be an ass, believe me, I would of said it differently.
Re: ShowPlayDialog , DIALOG_STYLE_MSGBOX -
AdamCooper - 20.06.2013
Edited - Fixed.