SA-MP Forums Archive
helo how to remove these errors? - 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: helo how to remove these errors? (/showthread.php?tid=490624)



helo how to remove these errors? - PAF - 27.01.2014

errors:
cod-e.pwn(8650) : error 075: input line too long (after substitutions)
cod-e.pwn(8651) : error 037: invalid string (possibly non-terminated string)
cod-e.pwn(8651) : error 017: undefined symbol "FF0000"
cod-e.pwn(8651) : error 029: invalid expression, assumed zero
cod-e.pwn(8651) : fatal error 107: too many error messages on one line

error lines:
CMD:rules(playerid, params[])
{
ShowPlayerDialog(playerid, 456, DIALOG_STYLE_MSGBOX, "RULES", "{FF0000}---= Call Of Duty - World War III Rules =---\n{FFFFFF}1.Don't Use Any Kind of bugs.\n2.Don't Hacks / Cheats.\n3.Don't Insult/spam/flood.\n4.Respect All Players/Admins.\n5.Don't Score Farm.\n6.Don't Park Your Car On Other Players.\n7.Don't Spawn Kill.\n8.Don't Ask For Score or cash or any propotion..etc from admins.\n9.Don't Team Attack/Kill.\n10.Don't Team Car Jack.\n11.Visit Our Website:www.codextreme.comoj.com and be part of the Community.\n{FF0000}______________________________ __________________", "OK", "");
return 1;
}


Re: helo how to remove these errors? - Scottas - 27.01.2014

String is to long. You have to split it in parts, save into variables and join with strcat function.


Re: helo how to remove these errors? - Vanter - 27.01.2014

EDIT: pass this post.


Re: helo how to remove these errors? - Misiur - 27.01.2014

You can put enters after arguments, or split that string. (use [pawn][/pawn] to paste code).

pawn Код:
CMD:rules(playerid, params[])
{
    static
        msg[576] = { 0, ... };
   
    strcat(msg, "{FF0000}---= Call Of Duty - World War III Rules =---\n{FFFFFF}1.Don't Use Any Kind of bugs.\n2.Don't Hacks / Cheats.\n3.Don't Insult/spam/flood.\n4.Respect All Players/Admins.\n");
    strcat(msg, "5.Don't Score Farm.\n6.Don't Park Your Car On Other Players.\n7.Don't Spawn Kill.\n8.Don't Ask For Score or cash or any propotion..etc from admins.\n9.Don't Team Attack/Kill.\n10.Don't Team Car Jack.\n11.Visit Our Website:http://www.codextreme.comoj.com and be part of the Community.\n{FF0000}______________________________ __________________");

    ShowPlayerDialog(playerid, 456, DIALOG_STYLE_MSGBOX, "RULES", msg, "OK", "");
    return 1;
}



Re: helo how to remove these errors? - Shetch - 27.01.2014

The string that you declared is too long. Use '\' to divide the string into multiple lines.

Example:

Код:
new string[] = "A very, very, very, very, very, very, very, very, very, very, very \
, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, \
, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, \
, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very \
long string.";



Re: helo how to remove these errors? - BroZeus - 27.01.2014

U can 2 dialog box for this link one dialog box with the response of first one
Right now i am very busy so i cant write the code for it so if u can w8 till tomorrow,i.e., within 20hrs of this reply then i will send the code for it till tomorrow


Re: helo how to remove these errors? - PAF - 27.01.2014

thanks


Re: helo how to remove these errors? - Scottas - 27.01.2014

Quote:
Originally Posted by Shetch
Посмотреть сообщение
The string that you declared is too long. Use '\' to divide the string into multiple lines.

Example:

Код:
new string[] = "A very, very, very, very, very, very, very, very, very, very, very \
, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, \
, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, \
, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very \
long string.";
It wont have any effect, you'll still get this error


Re: helo how to remove these errors? - BroZeus - 28.01.2014

So here is the code use this one_>
Код:
CMD:rules(playerid,parmas[])
{
ShowPlayerDialog(playerid, 456, DIALOG_STYLE_MSGBOX, "RULES(Page-1/2)","{FF0000}---= Call Of Duty - World War III Rules =---\n{FFFFFF}1.Don't Use Any Kind of bugs.\n2.Don't Hacks / Cheats.\n3.Don't Insult/spam/flood.\n4.Respect All Players/Admins.\n5.Don't Score Farm.\n6.Don't Park Your Car On Other Players.","Next Page","");

return 1;}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 456)
{new rules2;
 ShowPlayerDialog(playerid, rules2, DIALOG_STYLE_MSGBOX,"RULES(Page-2/2)", "{FFFFFF}7.Don't Spawn Kill.\n8.Don't Ask For Score or cash or any propotion..etc from admins.\n9.Don't Team Attack/Kill.\n10.Don't Team Car Jack.\n11.Visit Our Website:www.codextreme.comoj.com and be part of the Community.\n{FF0000}______________________________ __________________","OK","");}
}