Errors on MSGBOX Dialog
#1

Hello i'am trying to create a dialog this is the command

Код:
CMD:donatehelp(playerid, params[])
{
	{
   	ShowPlayerDialogEx(playerid,s7955,DIALOG_STYLE_MSGBOX,"Donate Help","{FF6347}VIP Donations\n{FFFFFF}Gold - P150 Per Month / 650 Permanent\nSilver - P100 Per Month / P450 Permanent\nPremium - P80 Per Month / P300 Permanent\n{FFFF00}Vehicle Donation\n{FFFFFF}In Dealership - P150\nRare Vehicle - P200\nGang Vehicles[4 Doors] - P150\n{008000}Customized Headquarters\n{FFFFFF}Big HQ without interior - P350\nBig HQ with interior - P450\nCustomized Interior - P150\nGate - P80\n{00FFFF}Businesses\n{FFFFFF}Weaponshop/Bank - P450\n24/7 - P250\nClothes shop - P200\n{FFC0CB}Giftbox\n{FFFFFF}30GB - P50/ 120GB - P150/ 250GB - P350\n{FF00FF}Cookies\n{FFFFFF}50PHP - 90Cookies / 150PHP - 360cookies 350PHP - 750cookies\n{0000FF}Faction Donate\n{FFFFFF}Hitman R1 - 80PHP / R2 - 150PHP / R3 - 250PHP / R4 - 300PHP / R5 - 350PHP\nHot Air Balloon - 400PHP\nRent a Vehicle Ownership - 450PHP","Close", "");
 	}
   	return 1;
}
The problem is i can't compile it properly. I already define it. here's the error codes
Код:
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\pawno\include\a_samp.inc(30) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2-1.pwn(13853) : error 075: input line too long (after substitutions)
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2-1.pwn(13854) : error 037: invalid string (possibly non-terminated string)
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2-1.pwn(13854) : error 017: undefined symbol "FF6347"
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2-1.pwn(13854) : error 017: undefined symbol "VIP"
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2-1.pwn(13854) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
The line 13854
Код:
ShowPlayerDialogEx(playerid,s7955,DIALOG_STYLE_MSGBOX,"Donate Help","{FF6347}VIP Donations\n{FFFFFF}Gold - P150 Per Month / 650 Permanent\nSilver - P100 Per Month / P450 Permanent\nPremium - P80 Per Month / P300 Permanent\n{FFFF00}Vehicle Donation\n{FFFFFF}In Dealership - P150\nRare Vehicle - P200\nGang Vehicles[4 Doors] - P150\n{008000}Customized Headquarters\n{FFFFFF}Big HQ without interior - P350\nBig HQ with interior - P450\nCustomized Interior - P150\nGate - P80\n{00FFFF}Businesses\n{FFFFFF}Weaponshop/Bank - P450\n24/7 - P250\nClothes shop - P200\n{FFC0CB}Giftbox\n{FFFFFF}30GB - P50/ 120GB - P150/ 250GB - P350\n{FF00FF}Cookies\n{FFFFFF}50PHP - 90Cookies / 150PHP - 360cookies 350PHP - 750cookies\n{0000FF}Faction Donate\n{FFFFFF}Hitman R1 - 80PHP / R2 - 150PHP / R3 - 250PHP / R4 - 300PHP / R5 - 350PHP\nHot Air Balloon - 400PHP\nRent a Vehicle Ownership - 450PHP","Close", "");
+1 REP!
Reply
#2

Your string is too long. Try using strcat.
Reply
#3

Hello!

Write it so:
PHP код:
new string[850];
    
strcat(string,"{FF6347}VIP Donations\n{FFFFFF}Gold - P150 Per Month / 650 Permanent\nSilver - P100 Per Month / P450 Permanent\nPremium - P80 Per Month / P300 Permanent\n{FFFF00}Vehicle Donation\n{FFFFFF}In Dealership - P150\nRare Vehicle - P200\nGang Vehicles[4 Doors] - P150\n{008000}Customized Headquarters\n{FFFFFF}Big HQ without interior - P350\nBig HQ with interior - P450\nCustomized Interior - P150\n");
    
strcat(string,"Gate - P80\n{00FFFF}Businesses\n{FFFFFF}Weaponshop/Bank - P450\n24/7 - P250\nClothes shop - P200\n{FFC0CB}Giftbox\n{FFFFFF}30GB - P50/ 120GB - P150/ 250GB - P350\n{FF00FF}Cookies\n{FFFFFF}50PHP - 90Cookies / 150PHP - 360cookies 350PHP - 750cookies\n{0000FF}Faction Donate\n{FFFFFF}Hitman R1 - 80PHP / R2 - 150PHP / R3 - 250PHP / R4 - 300PHP / R5 - 350PHP\nHot Air Balloon - 400PHP\nRent a Vehicle Ownership - 450PHP");
    
ShowPlayerDialogEx(playerid,s7955,DIALOG_STYLE_MSGBOX,"Donate Help",string,"Close",""); 
The row was too long.

Mencent
Reply
#4

Mencent is that will having 2 dialogs at the same time or with page ?
Reply
#5

Chucky, STRCAT formats your Dialog's contents, all that text will be inside 1 dialog
See how at the top "new string" is defined
then
strcat(string,
strcat(string,
They are both formatted for string, meaning its just extended
and then "ShowPlayerDialog only has "String" where you would type in the text normally, that just redirects it to
strcat instead, or wherever you are formatting "string"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)