/cmds help!!
#1

Код:
CMD:cmds(playerid,params[])
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{ff0000}>>>>{00cc00}Server Commands{ff0000}<<<<", "\r\n{FFFF33}>>{00cc00}|{FFFFFF}/hp\r\n{FFFF33}>>{00cc00}|{FFFFFF}/sync\r\n{FFFF33}>>{00cc00}|{FFFFFF}/afk /back\r\n{FFFF33}>>{00cc00}|{FFFFFF}/rules\r\n{FFFF33}>>{00cc00}|{FFFFFF}/AnimList\r\n{FFFF33}>>{00cc00}|{FFFFFF}/GunShop\r\n{FFFF33}>>{00cc00}|{FFFFFF}/site\r\n{FFFF33}>>{00cc00}|{FFFFFF}/cs\r\n{FFFF33}>>{00cc00}|{FFFFFF}/kill\r\n{FFFF33}>>{00cc00}|{FFFFFF}/ls\r\n{FFFF33}>>{00cc00}|{FFFFFF}/credits\r\n{FFFF33}>>{00cc00}|{FFFFFF}/updates", "OK", "Exit");
    return 1;
}
[pawncode][/pawncode]
Код:
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(376) : error 075: input line too long (after substitutions)
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(377) : error 037: invalid string (possibly non-terminated string)
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(377) : error 029: invalid expression, assumed zero
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(377) : error 017: undefined symbol "r"
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(377) : fatal error 107: too many error messages on one line

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


5 Errors.
[pawncode][/pawncode]
Reply
#2

Your line to show dialog is too long, you must divide string to two parts with function strcat, which unite more strings to one.

pawn Код:
CMD:cmds(playerid,params[])
{
    new String[450];
    strcat(String, "\r\n{FFFF33}>>{00cc00}|{FFFFFF}/hp\r\n{FFFF33}>>{00cc00}|{FFFFFF}/sync\r\n{FFFF33}>>{00cc00}|{FFFFFF}/afk /back\r\n{FFFF33}>>{00cc00}|{FFFFFF}/rules\r\n{FFFF33}>>{00cc00}|{FFFFFF}/AnimList\r\n{FFFF33}>>{00cc00}|{FFFFFF}/GunShop");
    strcat(String, "\r\n{FFFF33}>>{00cc00}|{FFFFFF}/site\r\n{FFFF33}>>{00cc00}|{FFFFFF}/cs\r\n{FFFF33}>>{00cc00}|{FFFFFF}/kill\r\n{FFFF33}>>{00cc00}|{FFFFFF}/ls\r\n{FFFF33}>>{00cc00}|{FFFFFF}/credits\r\n{FFFF33}>>{00cc00}|{FFFFFF}/updates");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{ff0000}>>>>{00cc00}Server Commands{ff0000}<<<<", String, "OK", "Exit");
    return 1;
}
Reply
#3

Thanks! rep+
Reply
#4

Use strcat mate.


##EDIT: Wops sorry didn't notice the answer is already posted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)