Help Please Script Error
#1

Код:
dcmd_ahelp(playerid, params[])
{
    ShowPlayerDialog(playerid,4211,0,"{{2F00FF}}Rank Commands","{2F00FF}Helper\n{FFC400}/gotos /agateo /agatec /repair /asay /goto /gethere /warn /car /akill\n\n{2F00FF}Moderators\n{FFC400}/giveweapon /disarm /announce /jetpack /kick /clearchat\n/freeze /unfreeze /spec /specoff /ajail /aunjail /slap\n/fakechat /mute /unmute\n\n{2F00FF}Admin\n{FFC400}/sethp /setarmour /gmoderator /ghelper /setcash /agivemoney /setscore /setskin\n/setweather /ban /healall\n\n{2F00FF}Owners\n{FFC400}/cbusiness /chouse /god /gadmin","Ok","");
	return 1;
	#pragma unused params
}

Код:
C:\Users\jazmine's\Desktop\Server\gamemodes\CNR-H.pwn(12267) : error 075: input line too long (after substitutions)
C:\Users\jazmine's\Desktop\Server\gamemodes\CNR-H.pwn(12268) : error 037: invalid string (possibly non-terminated string)
C:\Users\jazmine's\Desktop\Server\gamemodes\CNR-H.pwn(12268) : error 029: invalid expression, assumed zero
C:\Users\jazmine's\Desktop\Server\gamemodes\CNR-H.pwn(12268) : error 017: undefined symbol "F00FF"
C:\Users\jazmine's\Desktop\Server\gamemodes\CNR-H.pwn(12268) : fatal error 107: too many error messages on one line

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


5 Errors.
How do I fix these errors?
Reply
#2

pawn Код:
new string3[512];
                new string1[256] = "{{2F00FF}}Rank Commands","{2F00FF}Helper\n{FFC400} \
                /gotos /agateo /agatec /repair /asay /goto /gethere /warn /car /akill\n \
                \n{2F00FF}Moderators\n{FFC400}/giveweapon /disarm /announce /jetpack /kick /clearchat\n"
;
                new string2[256] = "/freeze /unfreeze /spec /specoff /ajail /aunjail /slap\n/fakechat /mute /unmute\n \
                \n{2F00FF}Admin\n{FFC400}/sethp /setarmour /gmoderator /ghelper /setcash /agivemoney /setscore /setskin\
                \n/setweather /ban /healall\n\n{2F00FF}Owners\n{FFC400}/cbusiness /chouse /god /gadmin"
;
                format(string3, sizeof(string3), "%s%s", string1, string2);
                ShowPlayerDialog(playerid,4211,0,string3,"Ok","");
There is a character limit, bypassed it by making two strings.
Reply
#3

Hello pete this is also given errors



Код:
C:\Users\JoshLovely\Desktop\CNR-H.pwn(12262) : error 075: input line too long (after substitutions)
C:\Users\JoshLovely\Desktop\CNR-H.pwn(12263) : error 027: invalid character constant
C:\Users\JoshLovely\Desktop\CNR-H.pwn(12264) : warning 217: loose indentation
C:\Users\JoshLovely\Desktop\CNR-H.pwn(12264) : error 029: invalid expression, assumed zero
C:\Users\JoshLovely\Desktop\CNR-H.pwn(12264) : error 017: undefined symbol "agivemoney"
C:\Users\JoshLovely\Desktop\CNR-H.pwn(12264) : error 029: invalid expression, assumed zero
C:\Users\JoshLovely\Desktop\CNR-H.pwn(12264) : fatal error 107: too many error messages on one line

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


6 Errors.
Reply
#4

My bad.

pawn Код:
#pragma unused params
    new string3[640], string1[320], string2[320];
    string1 = "{2F00FF}Helper\n{FFC400} \
    /gotos /agateo /agatec /repair /asay /goto /gethere /warn /car /akill\n \
    \n{2F00FF}Moderators\n{FFC400}/giveweapon /disarm /announce /jetpack /kick /clearchat"
;
    string2 = "\n /freeze /unfreeze /spec /specoff /ajail /aunjail /slap\n/fakechat /mute /unmute\n \
    \n{2F00FF}Admin\n{FFC400}/sethp /setarmour /gmoderator /ghelper /setcash /agivemoney /setscore /setskin\
    \n/setweather /ban /healall\n\n{2F00FF}Owners\n{FFC400}/cbusiness /chouse /god /gadmin"
;
    format(string3, sizeof(string3), "%s%s", string1, string2);
    ShowPlayerDialog(playerid,4211,DIALOG_STYLE_INPUT,"{2F00FF}Rank Commands",string3,"Ok","");
    return 1;
Reply
#5

pawn Код:
new
    iStr[512] = "{2F00FF}Helper\n{FFC400}/gotos /agateo /agatec /repair /asay /goto /gethere";

strcat(iStr, "/warn /car /akill\n \n{2F00FF}Moderators\n{FFC400}/giveweapon /disarm /announce /jetpack /kick /clearchat");
strcat(iStr, "\n /freeze /unfreeze /spec /specoff /ajail /aunjail /slap\n/fakechat /mute /unmute\n{2F00FF}Admin\n{FFC400}/sethp /setarmour /gmoderator /ghelper /setcash /agivemone /setscore /setskin");
strcat(iStr, "\n/setweather /ban /healall\n\n{2F00FF}Owners\n{FFC400}/cbusiness /chouse /god /gadmin");

ShowPlayerDialog(playerid, 4211, DIALOG_STYLE_INPUT, "{2F00FF}Rank Commands", iStr, "OK", "");
Reply
#6

Both will work, but I think [L3th4l]'s method is better.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)