/cmds help!! - 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)
+--- Thread: /cmds help!! (
/showthread.php?tid=533474)
/cmds help!! -
YanLanger - 24.08.2014
Код:
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]
Re: /cmds help!! -
Thogy - 24.08.2014
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;
}
Re: /cmds help!! -
YanLanger - 24.08.2014
Thanks! rep+
Re: /cmds help!! -
Beckett - 24.08.2014
Use strcat mate.
##EDIT: Wops sorry didn't notice the answer is already posted.