Text is not showing
#1

Hi.

I created a value showing in dialog. It looks like this:

Код:
CMD:budget(playerid, params[])
{
	new string[64], str[2048];
	format(string, sizeof(string), "Budget amount: %d\n", Budget);
	strcat(str, string);
	strcat(str, "\n");
	strcat(str, "text");
	ShowPlayerDialog(playerid, DIALOG_BUDGET, DIALOG_STYLE_MSGBOX, "Budget info", string, "OK", "");
	return 1;
}
The problem is, that the text is not showing. Not even the new line.

When i type /budget, only thing, that shows up is one line, that says the amount budget, nothing else.

Where is the "fatal error" that will cure this?

For any help, I will be much more, then just thankful.
Reply
#2

PHP код:
CMD:budget(playeridparams[])
{
    new 
str[90], dialog[145];
    
format(strsizeof(str), "Budget amount: %d\n\n"Budget); strcat(dialogstr);
    
strcat(dialog"text");
    
ShowPlayerDialog(playeridDIALOG_BUDGETDIALOG_STYLE_MSGBOX"Budget info"dialog"OK""");
    return 
1;

Reply
#3

still the same issue

instead of pasting code, if somebody could please point out, where the mistake is, so i can learn on it....


i am not the type of guy, that just wants to copy and paste
Reply
#4

What does not work or where is the error?

sa-mp-250.jpg
Reply
#5

Nowhere. I just wanna see, that where was the mistake IN MY CODE, so i can correct it myself and learn on it. I dont want to use other codes, I want to maintain my variables and coding style.
Reply
#6

Код:
CMD:budget(playerid, params[])
{
	new string[500], str[500];
	format(string, sizeof(string), "Budget amount: %d\n", Budget);
	strcat(str, string);
	strcat(str, "\n");
	strcat(str, "text");
	ShowPlayerDialog(playerid, DIALOG_BUDGET, DIALOG_STYLE_MSGBOX, "Budget info", str, "OK", "");
	return 1;
}
You have to use str instead of string in ShowPlayerDialog.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)