Line too long
#1

Код:
	if(strcmp(cmd,"/radiomenu",true)==0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerData[playerid][pCradio] > 0)
			{
				ShowPlayerDialog(playerid,9991,DIALOG_STYLE_LIST,"Posturi de Radio","{FFFF00}Play {FFFFFF}Kiss FM\r\n{FFFF00}Play {FFFFFF}One FM\r\n{FFFF00}Play {FFFFFF}Pro FM\r\n{FFFF00}Play {FFFFFF}Radio 21\r\n{FFFF00}Play {FFFFFF}Radio ZU\r\n{FFFF00}Play {FFFFFF}Taraf FM\n\{FFFF00}Play {FFFFFF}Vibe FM\r\n{FFFF00}Play {FFFFFF}WazzUP Radio\r\n{FFFF00}Play {FFFFFF}Radio Greu de Difuzat\r\n{FFFF00}Play {FFFFFF}Radio Tequilla\r\n{FFFF00}Play {FFFFFF}Radio Guerilla\r\n{E60000}Opreste radioul","Selecteaza", "Inchide");			
				SendClientMessage(playerid, COLOR_GRAD1,"Daca nu anumite radiouri nu le auzi trebuie sa iti instalezi un plugin audio!");
				SendClientMessage(playerid, COLOR_GRAD1,"Link catre pluginul audio recomandat de noi:");
				SendClientMessage(playerid, COLOR_GRAD1,"http://www.solidfiles.com/d/e690df58ad/");
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_WHITE,"Nu ai un casetofon, poti sa iti cumperi de la 24-7");
			}
		}
		return 1;
	}
error 075: input line too long (after substitutions) at line 6 ( " { " )
Reply
#2

I'm assuming it's the ShowPlayerDialog line.
Perhaps create a "Next Page" option, and direct them to a new dialog.
That'd shorten the line(s).
Reply
#3

My way of dealing with long dialogs is making an array for each long dialog like this :
pawn Код:
new VIPHelpDialog[][] =
{
    "{FF0000}Q : What Is VIP ? And What Does It Mean\n{FFFFFF}A : VIP Is A Group Of Important People And VIP Means (Very Important People)\n\n",
    "{FF0000}Q : How Can I Be A VIP ? Do I Need To Pay ?\n{FFFFFF}A : In Order To Become A VIP You Need To Reach 1000 Kills And It Is Completly Free\n\n",
    "{FF0000}Q : What Is Special In Being A VIP ?\n{FFFFFF}A : VIP's Have Their Own Personal Chat They Are More Respcted Then Normal\n",
    "{FFFFFF}Players And They Have Their Own Base Which They Can Gather In With Personal\n{FFFFFF}Cars More Features Are Coming In The Next Releases\n\n",
    "\n{FF8000}Notes : \n\n\t\t{FFFF00}- Same Server Rules Applies To VIP Members (/rules)\n\n",
    "\t\t{FFFF00}- If A Player Gives A VIP Member A Cookie They VIP Will\n\t\t{FFFF00}Get A (+5) Cookie Unlike Normal Players Which They Get\n\t\t{FFFF00}(+1) If Someone Gives Them A Cookie\n\n\n\n\n",
    "\n{FF8000}Commands : \n\n\t\t{FFFF00}- /afk (Will Teleport You To The VIP Longue)\n\t\t{FFFF00}- /(v)ip (To Talk In The VIP Chat)\n\n\n\n"
};
Then before showing the dialog i format it like this :
pawn Код:
new Str[1500];
    format(Str, sizeof(Str), "%s%s%s%s%s%s%s", VIPHelpDialog[0], VIPHelpDialog[1], VIPHelpDialog[2], VIPHelpDialog[3], VIPHelpDialog[4], VIPHelpDialog[5], VIPHelpDialog[6]);
Then finally show the dialog :
pawn Код:
ShowPlayerDialog(playerid, DIALOG_VIP_HELP, DIALOG_STYLE_MSGBOX, "VIP Help", Str, "Close", "");
Reply
#4

You can also use strcat, which is faster than format in this case.
Reply
#5

Quote:
Originally Posted by playbox12
Посмотреть сообщение
You can also use strcat, which is faster than format in this case.
Yeah also true strcat is faster then format i didn't use it because i couldn't know how, and i didn't bother asking :P
Reply
#6

"listitem" will working too ?
Reply
#7

Anybody can answer please ...
Reply
#8

pawn Код:
new string[415];
        string = "{FFFF00}Play {FFFFFF}Kiss FM\r\n{FFFF00}Play {FFFFFF}One FM\r\n{FFFF00}Play {FFFFFF}Pro FM\r\n{FFFF00}Play {FFFFFF}Radio 21\r\n";
        strcat(string, "{FFFF00}Play {FFFFFF}Radio ZU\r\n{FFFF00}Play {FFFFFF}Taraf FM\n{FFFF00}Play {FFFFFF}Vibe FM\r\n{FFFF00}Play {FFFFFF}WazzUP Radio\r\n");
        strcat(string, "{FFFF00}Play {FFFFFF}Radio Greu de Difuzat\r\n{FFFF00}Play {FFFFFF}Radio Tequilla\r\n{FFFF00}Play {FFFFFF}Radio Guerilla\r\n{E60000}Opreste radioul");
        ShowPlayerDialog(playerid,9991,DIALOG_STYLE_LIST,"Posturi de Radio",string,"Selecteaza", "Inchide");
EDIT: Sorry, full code is as follows:
pawn Код:
if(strcmp(cmdtext,"/radiomenu",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerData[playerid][pCradio] > 0)
            {
                new string[415];
                string = "{FFFF00}Play {FFFFFF}Kiss FM\r\n{FFFF00}Play {FFFFFF}One FM\r\n{FFFF00}Play {FFFFFF}Pro FM\r\n{FFFF00}Play {FFFFFF}Radio 21\r\n";
                strcat(string, "{FFFF00}Play {FFFFFF}Radio ZU\r\n{FFFF00}Play {FFFFFF}Taraf FM\n{FFFF00}Play {FFFFFF}Vibe FM\r\n{FFFF00}Play {FFFFFF}WazzUP Radio\r\n");
                strcat(string, "{FFFF00}Play {FFFFFF}Radio Greu de Difuzat\r\n{FFFF00}Play {FFFFFF}Radio Tequilla\r\n{FFFF00}Play {FFFFFF}Radio Guerilla\r\n{E60000}Opreste radioul");
                ShowPlayerDialog(playerid,9991,DIALOG_STYLE_LIST,"Posturi de Radio",string,"Selecteaza", "Inchide");
                SendClientMessage(playerid, COLOR_GRAD1,"Daca nu anumite radiouri nu le auzi trebuie sa iti instalezi un plugin audio!");
                SendClientMessage(playerid, COLOR_GRAD1,"Link catre pluginul audio recomandat de noi:");
                SendClientMessage(playerid, COLOR_GRAD1,"http://www.solidfiles.com/d/e690df58ad/");
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_WHITE,"Nu ai un casetofon, poti sa iti cumperi de la 24-7");
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)