Input Line Too Long (After Submissions)
#1

So, I've got this code:

pawn Code:
}/*
    if(!strcmp(cmdtext, "/rules", true))
    {
        if(IsPlayerConnected(playerid))
        {
            new message3[] = "\n{AFAFAF}StuntNoobZ Rules:\n1. Any form of Cheating or Hacking is NOT tolerated on StuntNoobZ with a punishment of being permanately banned. \n2. Respect ALL Players, not just the StuntNoobZ Administrators \n3. Do not overkill players as in don't spawn kill them over and over. \n4. Begging for Administrator Status will only reduce your chances of getting chosen to become one, so don't do it! \n5. No racist, discriminating, or offensive comments towards others. \n6. If you have issues with another player, do not argue with them about it, get assistance from an Administrator, or simply ignore the player. \n7. Enjoy the server and please have a good time for yourself and others around! \n8. The [R] Crew has settled home in StuntNoobZ, so please treat them with respect, as we do not take shit. \n9. Owner: [R]Skriptz\n";
            ShowPlayerDialog(playerid, RULESDIALOG2, DIALOG_STYLE_MSGBOX, "  {FFFF00}StuntNoobZ - Stunting Awesomeness!",message3,"Understood","");
            return 1;
        }
        return 1;
    }*/
And if the long line is not commented, it crashes my pawno (goes unresponsive). When it's commented, however, I get the error:

Code:
error 075: input line too long (after substitutions)
I'm sure it's some simple thing that I haven't thought about, but I'm stumped on it. Any help would be greatly appreciated!
Reply
#2

The commen problem though, try using strcat.

https://sampwiki.blast.hk/wiki/Strcat
-FalconX
Reply
#3

Quote:
Originally Posted by FalconX
View Post
The commen problem though, try using strcat.

https://sampwiki.blast.hk/wiki/Strcat
-FalconX
I appreciate the help, it made things a lot smoother and looks much better.
Reply
#4

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/rules", true))
    {
        if(IsPlayerConnected(playerid))
        {
            new sz_msg [ 900 ];
            strcat( sz_msg, "1. Any form of Cheating or Hacking is NOT tolerated on StuntNoobZ with a punishment of being permanately banned.\r\n");
            strcat( sz_msg, "2. Respect ALL Players, not just the StuntNoobZ Administrators.\r\n");
            strcat( sz_msg, "3. Do not overkill players as in don't spawn kill them over and over.\r\n");
            strcat( sz_msg, "4. Begging for Administrator Status will only reduce your chances of getting chosen to become one, so don't do it!\r\n");
            strcat( sz_msg, "5. No racist, discriminating, or offensive comments towards others.\r\n");
            strcat( sz_msg, "6. If you have issues with another player, do not argue with them about it, get assistance from an Administrator, or simply ignore the player.\r\n");
            strcat( sz_msg, "7. Enjoy the server and please have a good time for yourself and others around!\r\n");
            strcat( sz_msg, "8. The [R] Crew has settled home in StuntNoobZ, so please treat them with respect, as we do not take shit.\r\n");
            strcat( sz_msg, "9. Owner: [R]Skriptz\r\n");
            ShowPlayerDialog(playerid, RULESDIALOG2, DIALOG_STYLE_MSGBOX, "StuntNoobZ Rules:", sz_msg, "Understood", "");
            return 1;
        }

    }
    return 0;
}
Reply
#5

Quote:
Originally Posted by TyThaBomb
View Post
I appreciate the help, it made things a lot smoother and looks much better.
Glad it helped you, good luck for the rest of the scripting mate You can ask me if you need any help(:

-FalconX
Reply
#6

Quote:
Originally Posted by FalconX
View Post
Glad it helped you, good luck for the rest of the scripting mate You can ask me if you need any help(:

-FalconX
Speaking of which, I've got another bug with strcat. It doesn't send all of the lines.

pawn Code:
}
    if(!strcmp(cmdtext, "/rules", true))
    {
        if(IsPlayerConnected(playerid))
        {
            strcat(string, "{FF6347}Any form of Cheating or Hacking is NOT tolerated on StuntNoobZ with a punishment of a permanent ban.\n");
            strcat(string, "{AFAFAF}Respect ALL Players, not just the StuntNoobZ Administrators\n");
            strcat(string, "{AFAFAF}Do not overkill players, as in don't spawn kill them over and over.\n");
            strcat(string, "{AFAFAF}Begging for Administrator Status will only reduce your chances of getting chosen to become one, so don't do it!\n");
            strcat(string, "{AFAFAF}No racist, offensive, or discriminating comments towards one another.\n");
            strcat(string, "{AFAFAF}If you have issues with another player, do not argue with them about it, consult an Administrator, or simply just ignore the player.\n");
            strcat(string, "{AFAFAF}Please enjoy yourself and allow others to have fun too!\n");
            strcat(string, "{AFAFAF}Owner: [R]Skriptz\n");
            strcat(string, "{005353}The [R] Crew ( Roam1n ) has settled here in StuntNoobZ, so please treat them with respect just as you would an Administrator, as we do not take shit.\n");
            ShowPlayerDialog(playerid, RULESDIALOG2, DIALOG_STYLE_MSGBOX, "  {FFFF00}StuntNoobZ - Rules!",string,"Okay","");
            return 1;
        }
        return 1;
    }
Reply
#7

Add:

pawn Code:
new string [900];
Reply
#8

Quote:
Originally Posted by ]Rafaellos[
View Post
Add:

pawn Code:
new string [900];
And fail.
Reply
#9

Why fail?
Reply
#10

Quote:
Originally Posted by ]Rafaellos[
View Post
Why fail?
That's a ridiculous amount of cells for something that requires 256 - 528. Never just instantly go to an insanely large number..
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)