Error Input Line Too Long
#1

Код:
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(250 -- 256) : warning 213: tag mismatch
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(250 -- 256) : warning 213: tag mismatch
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(250 -- 256) : warning 213: tag mismatch
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(302) : error 075: input line too long (after substitutions)
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(311) : error 075: input line too long (after substitutions)
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(312) : error 075: input line too long (after substitutions)
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(313) : error 075: input line too long (after substitutions)
C:\Documents and Settings\Disturbed\Desktop\LSLRP 0.3C\gamemodes\tri-city.pwn(295) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
cShowPlayerDialog( playerid, dialogid )
{
    switch( dialogid )
    {
        // Commented dialog IDs below are due to input line size
        /*
        case DIALOG_REGISTRATION: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_INPUT, "Account Registration", "Welcome to Tri-City Roleplay. Please choose a password for your account.", "Okay", "" );
    //Line 302  case DIALOG_VERIFICATION: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_INPUT, "Account Verification", "Welcome back to Tri-City Roleplay. Please insert your account password.", "Okay", "Leave" );
        case DIALOG_CHARACTER_SETUP_1: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_MSGBOX, "Character Creation", "This username and password will be used to access your master account, from which you can accessany of the characters that you play. You may have more than one character if you want. We'll now move on to the character creation section. \n\nThanks for joining us. We're about to create your character. You should carefully consider what type of character you want to play, and what his or her strengths and weaknesses should be, because it will later affect game play. Unlike most SA-MP roleplay servers, skins here simply tell others what kind of clothes you are wearing. You will choose your own race, build, hair color and starting stats. You can purchase additional skins at any clothing store. Click Okay when you are ready to get started.", "Okay", "" );
        case DIALOG_CHARACTER_SETUP_2: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "Please choose your race", "White\nBlack\nHispanic\nAsian\nPacific Islander\nNative American", "Okay", "" );
        case DIALOG_CHARACTER_SETUP_3: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "Please choose your hair color", "Dark Brown\nLight Brown\nBlack\nRed\nLight Blonde\nDark Blonde\nGrey", "Okay", "" );
        case DIALOG_CHARACTER_SETUP_4: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "Please choose your eye color", "Blue\nGreen\nBrown\nHazel\nGrey", "Okay", "" );
        case DIALOG_CHARACTER_SETUP_5: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "Please choose your build", "Very Large Build\nLarge Build\nMedium Build\nSlender Build\nVery Slim Build", "Okay", "" );
        case DIALOG_CHARACTER_SETUP_6: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "Please choose your gender", "Male\nFemale", "Okay", "" );
        case DIALOG_CHARACTER_SETUP_7: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "Please choose your height (in feet)", "4\n5\n6", "Okay", "" );
        case DIALOG_CHARACTER_SETUP_8: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "Please choose your height (in inches)", "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n", "Okay", "" );
        //Line 312case DIALOG_CHARACTER_SETUP_9: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "You will next set up your character statistics, which we call STATS. Your stats will determine how successful you are in certain situations, and how quickly your character can learn new things. There are four statistics. Strength, Dexterity, Constitution and Intelligence. Your strength will determine how successful you are when performing actions that require brute strength, such as breaking away from a person that is holding onto you, or breaking down a door. Your dexterity determines how successful you are at tasks that require you move quickly or have deft hands such as pickpocketing, using a set of lock picks or slipping out of a pair of handcuffs. Your constitution determines how well you can take a hit. A person with a high constitution will be able to take more hits, or more bullets and will die more slowly than a person with a very low constitution. Your intelligence determines how quickly you can improve the skills that you learn, which will allow you to disable alarm systems faster, hotwire cars more successfully or use other skills. You will start with your stats at 10. They can be improved up to 100. There are several ways to improve stats. Working out at a gym will allow you to improve your strength, while studying at the library or taking classes will allow you to improve your intelligence. Right now, you have all of your stats at 10. you can also spend five additional points on your stats. Choose where you want to spend your five points.", "Okay", "" );
        //Line 312*/

    //Line 313}
    return 1;
}
Now I'm assuming that the errors are given cause the lines are actually too long, but how would I go about fixing this?
Reply
#2

pawn Код:
DIALOG_CHARACTER_SETUP_9: ShowPlayerDialog( playerid, dialogid, DIALOG_STYLE_LIST, "You will next set up your character statistics, which we call STATS. Your stats will determine how successful you are in certain situations, and how quickly your character can learn new things. There are four statistics. Strength, Dexterity, Constitution and Intelligence. Your strength will determine how successful you are when performing actions that require brute strength, such as breaking away from a person that is holding onto you, or breaking down a door. Your dexterity determines how successful you are at tasks that require you move quickly or have deft hands such as pickpocketing, using a set of lock picks or slipping out of a pair of handcuffs. Your co\
nstitution determines how well you can take a hit. A person with a high constitution will be able to take more hits, or more bullets and will die more slowly than a person with a very low constitution. Your intelligence determines how quickly you can improve the skills that you learn, which will allow you to disable alarm systems faster, hotwire cars more successfully or use other skills. You will start with your stats at 10. They can be improved up to 100. There are several ways to improve stats. Working out at a gym will allow you to improve your strength, while studying at the library or taking classes will allow you to improve your intelligence. Right now, you have all of your stats at 10. you can also spend five additional points on your\
 stats. Choose where you want to spend your five points."
, "Okay", "" );
Reply
#3

The way I avoid these kinds of errors when having a long dialog text is to split the text into several pieces. Like:
pawn Код:
new string[400]; //make sure it's huge enough
format(string, sizeof string, "first part of the text");
strcat(string, "second part of your text. You can also keep doing this to add more parts");
ShowPlayerDialog(...... string .....); //then at ShowPlayerDialog's "info" parameter, use "string".
Reply
#4

Ok thanks, don't need anymore support.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)