SA-MP Forums Archive
input line too long (after substitutions) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: input line too long (after substitutions) (/showthread.php?tid=238535)



input line too long (after substitutions) - Unknown123 - 12.03.2011

I tried to make it shorter (Look at my code), but i still get the same Errors
pawn Код:
ShowPlayerDialog(
                         playerid,
                         ADMIN_PANEL+16,
                         DIALOG_STYLE_LIST,
                         "Admin Panel - Level 5",
                         "Kick Player \n{0026FF}Mute Player \n{FFFFFF}Unmute Player \nAdmin Private Message\n\
                         \n{007F0E}Freeze Player \n{FFFFFF}Unfreeze Player \nWarn Player\n\
                         \nAdmin Package \n{FF0000}Ban Player \n{FFFFFF}Player Info \nJail Player \nUnjail Player\n\
                         \nSpectate \nSpectate Off \nSpawn Player \n{FF6A00}Goto Player \n{FFFFFF}Kill Player\n\
                         \nGet Here \nDisarm Player \nBlow Up Player\n~Cage The Player\n\
                         \n~Uncage The Player \n*Cage The Vehicle \n*Uncage The Vehicle \nKill Everyone\n\
                         \nMega Jump On \nMega Jump Off \nCrash Player"
,
                         "Select",
                         "Cancel");



Re: input line too long (after substitutions) - admantis - 12.03.2011

you need separate dialogs


Re: input line too long (after substitutions) - Unknown123 - 12.03.2011

Quote:
Originally Posted by admantis
Посмотреть сообщение
you need separate dialogs
Example please :P


Re: input line too long (after substitutions) - admantis - 12.03.2011

In one dialog it will say some actions (you can shorten it to half) and then it will say 'Click 'Next' for the other admin commands' and in that second dialog you put the text you cut before from the first dialog.

pawn Код:
Admin Commands: ....................................................
................................................
.......................................................

Click 'Next' for the remaining commands

(Next)       (Cancel)
I hope you understand it


Re: input line too long (after substitutions) - Unknown123 - 12.03.2011

U kidding me? Then i habe to retype the whole admin system


Re: input line too long (after substitutions) - cessil - 12.03.2011

format a string and use that instead


Re: input line too long (after substitutions) - Unknown123 - 12.03.2011

Quote:
Originally Posted by cessil
Посмотреть сообщение
format a string and use that instead
..Example Plox :P


Re: input line too long (after substitutions) - Gh0sT_ - 12.03.2011

use strcat

strcat( string, "text", lenght );
ShowPlayerDialog( playerid, id, style, "text", string, "button", "button2" );


Re: input line too long (after substitutions) - [L3th4l] - 12.03.2011

Quote:
Originally Posted by admantis
Посмотреть сообщение
you need separate dialogs
No you don't!

pawn Код:
new
    iDialogStr[256] = "This can be a long line, put all your shit in here. Remember to also add a \n";

strcat(iDialogStr, "so it can place a new line on the dialog. So yeah, remember the \n");
strcat(iDialogStr, "and we've just created a new line!\n\n");
strcat(iDialogStr, "Now we've moved down '2' lines!");

ShowPlayerDialog(playerid, ....., "Dialog Info", iDialogStr, "OK", "");



Re: input line too long (after substitutions) - admantis - 12.03.2011

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
No you don't!

pawn Код:
new
    iDialogStr[256] = "This can be a long line, put all your shit in here. Remember to also add a \n";

strcat(iDialogStr, "so it can place a new line on the dialog. So yeah, remember the \n");
strcat(iDialogStr, "and we've just created a new line!\n\n");
strcat(iDialogStr, "Now we've moved down '2' lines!");

ShowPlayerDialog(playerid, ....., "Dialog Info", iDialogStr, "OK", "");
Sorry I didn't know about that function