PDA

View Full Version : Dialog line too long?


nitrochegs
16/10/2011, 10:07 AM
Okay, so I wanted to make a dialog for my rules, using /rules. So I used zcmd and made:

CMD:rules(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Server Rules", "1. No insulting or disrespecting other players\n2. No spamming anything in any way\n3. No ramming or blocking other players\n4. No farming anything in anyway.\n5. Do not say any jokes that may have a negative affect on others.\n6. No advertising allowed in all chats\n7. No mods that benefit anything and anyone are allowed\n8. No cheats, including hacks of any kind, are allowed.\nFor any explanation on all these rules please visit our website\nwww.websitegoeshere.com", "Agree", "");
return 1;
}

But I got 5 errors when compiling:

C:\Users\myuser\Desktop\Misc\Server\gamemodes\test .pwn(143) : error 075: input line too long (after substitutions)
C:\Users\myuser\Desktop\Misc\Server\gamemodes\test .pwn(144) : error 037: invalid string (possibly non-terminated string)
C:\Users\myuser\Desktop\Misc\Server\gamemodes\test .pwn(144) : warning 215: expression has no effect
C:\Users\myuser\Desktop\Misc\Server\gamemodes\test .pwn(144) : error 001: expected token: ";", but found "."
C:\Users\myuser\Desktop\Misc\Server\gamemodes\test .pwn(144) : error 029: invalid expression, assumed zero
C:\Users\myuser\Desktop\Misc\Server\gamemodes\test .pwn(144) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

But I tried making it a lot shorter by only using 2 rules and it compiled! I do not understand why it is giving me so much errors.

Is it just basically too long and cannot be put into a dialog, or is there a way to break it into two lines instead of just one? Because I've seen long rules in other servers put into dialogs.

P.S. I also had another dialog made, used it instead on that line and it was much shorter, so it then compiled, thats why I came to the conclusion that the line it too long.

Thanks for reading :)

HyperZ
16/10/2011, 10:11 AM
CMD:rules(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Server Rules",
"1. No insulting or disrespecting other players\n\
2. No spamming anything in any way\n\
3. No ramming or blocking other players\n\
4. No farming anything in anyway.\n\
5. Do not say any jokes that may have a negative affect on others.\n\
6. No advertising allowed in all chats\n\
7. No mods that benefit anything and anyone are allowed\n\
8. No cheats, including hacks of any kind, are allowed.\n\
For any explanation on all these rules please visit our website\n\
www.websitegoeshere.com", "Agree", "");
return 1;
}

TheLazySloth
16/10/2011, 10:14 AM
CMD:rules(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Server Rules",
"1. No insulting or disrespecting other players\n\
2. No spamming anything in any way\n\
3. No ramming or blocking other players\n\
4. No farming anything in anyway.\n\
5. Do not say any jokes that may have a negative affect on others.\n\
6. No advertising allowed in all chats\n\
7. No mods that benefit anything and anyone are allowed\n\
8. No cheats, including hacks of any kind, are allowed.\n\
For any explanation on all these rules please visit our website\n\
www.websitegoeshere.com", "Agree", "");
return 1;
}

This won't work, but mine will...

CMD:rules(playerid, params[])
{
new
string[500];
format(string, sizeof(string), "1. No insulting or disrespecting other players\n2. No spamming anything in any way\n3. No ramming or b");
format(string, sizeof(string), "%slocking other players\n4. No farming anything in anyway.\n5. Do not say any jokes that may have a n", string);
format(string, sizeof(string), "%segative affect on others.\n6. No advertising allowed in all chats\n7. No mods that benefit anything", string);
format(string, sizeof(string), "%s and anyone are allowed\n8. No cheats, including hacks of any kind, are allowed.\nFor any explanati", string);
format(string, sizeof(string), "%son on all these rules please visit our website\nwww.websitegoeshere.com", string);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Server Rules", string, "Agree", "");
return 1;
}

nitrochegs
16/10/2011, 10:24 AM
CMD:rules(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Server Rules",
"1. No insulting or disrespecting other players\n\
2. No spamming anything in any way\n\
3. No ramming or blocking other players\n\
4. No farming anything in anyway.\n\
5. Do not say any jokes that may have a negative affect on others.\n\
6. No advertising allowed in all chats\n\
7. No mods that benefit anything and anyone are allowed\n\
8. No cheats, including hacks of any kind, are allowed.\n\
For any explanation on all these rules please visit our website\n\
www.websitegoeshere.com", "Agree", "");
return 1;
}
Thanks for showing me how to break it into multiple lines, ive been wondering how to do that. :)
But, the line is still too long, according to the compiler, it gave me an error :\
Thanks anyways for your help :)

CMD:rules(playerid, params[])
{
new
string[500];
format(string, sizeof(string), "1. No insulting or disrespecting other players\n2. No spamming anything in any way\n3. No ramming or b");
format(string, sizeof(string), "%slocking other players\n4. No farming anything in anyway.\n5. Do not say any jokes that may have a n", string);
format(string, sizeof(string), "%segative affect on others.\n6. No advertising allowed in all chats\n7. No mods that benefit anything", string);
format(string, sizeof(string), "%s and anyone are allowed\n8. No cheats, including hacks of any kind, are allowed.\nFor any explanati", string);
format(string, sizeof(string), "%son on all these rules please visit our website\nwww.websitegoeshere.com", string);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Server Rules", string, "Agree", "");
return 1;
}
Ah! I see, it compiled. Thanks for your help :) I wish I could give rep but mine doesn't count :\

TheLazySloth
16/10/2011, 10:41 AM
It will count in the future when you do have 50posts ;)