Input too long -
Typhome - 19.09.2010
Hey, i have DriveSchool theory in dialog. But MSGBOX (of dialog) has too long input (thats why compiler says).
How fix that problema? :S
Код:
C:\Program Files\SA-MP Serverpack\gamemodes\estprojekt.pwn(4756) : error 075: input line too long (after substitutions)
C:\Program Files\SA-MP Serverpack\gamemodes\estprojekt.pwn(4757) : error 037: invalid string (possibly non-terminated string)
C:\Program Files\SA-MP Serverpack\gamemodes\estprojekt.pwn(4757) : error 017: undefined symbol "Hello"
C:\Program Files\SA-MP Serverpack\gamemodes\estprojekt.pwn(4757) : error 029: invalid expression, assumed zero
C:\Program Files\SA-MP Serverpack\gamemodes\estprojekt.pwn(4757) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
This forum requires that you wait 120 seconds between posts. Please try again in 31 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 23 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 17 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 12 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 6 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds.
Re: Input too long -
DeathOnaStick - 19.09.2010
The line in pawno, or whatever you use, is too long. Try to shorten it or split it up into more lines.
pawn Код:
new Bla=0;
if(bla=0&&Blafunction1(blublu,bleeeh)==2){Blafunction2(asd);Blululu(rarara);}
Should be like:
pawn Код:
new Bla=0;
if(bla=0&&Blafunction1(blublu,bleeeh)==2){
Blafunction2(asd);
Blululu(rarara);
}
Hope this helped you
Re: Input too long -
Vince - 19.09.2010
Add a backslash (\) somewhere in your line, then continue on the next one like so:
pawn Код:
ShowPlayerDialog(playerid, E_DIALOG_WHATEVER, "Random infobox", "\
this is some very long text and \
alot of info that we want \
to split into multiple lines.", "Ok", "Cancel");
Re: Input too long -
Typhome - 19.09.2010
Quote:
Originally Posted by Vince
Add a backslash (\) somewhere in your line, then continue on the next one like so:
pawn Код:
ShowPlayerDialog(playerid, E_DIALOG_WHATEVER, "Random infobox", "\ this is some very long text and \ alot of info that we want \ to split into multiple lines.", "Ok", "Cancel");
|
Still same problema.
Re: Input too long -
Vince - 19.09.2010
There are limits, off course. This is what I'm using. It's nearly at the limit, because I already had to remove some text from it.
pawn Код:
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "» Register", "\
Welcome\n\n\
\
This nickname has not been registered.\n\
You are not obligated to register an account, but it is highly recommended.\n\n\
\
If you wish to register, input your desired password below and click 'Register'. \n\
Please note that passwords are sha1 encrypted. No-one, including the owner, can see or retrieve it.\n\n\
\
If you do not wish to register now, click 'Continue'.\n\n\
\
Password:", "Register", "Continue");
Re: Input too long - [L3th4l] - 19.09.2010
Try using this:
pawn Код:
new LongString[300] = "This is the message that you will be receiving, you can also attach even more\n");
strcat(LongString, "Messages by adding a '\'n at the end of the sentence like right now\n");
strcat(LongString, "You can add as many text as you want, but this is the only way i can think\n");
strcat(LongString, "of to create this loooooooooooooooooooooooooooooooooooooooooong msgs");
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Test", LongString, "Ok", "Close");
If you are going to use more text, increase the array size
Re: Input too long -
Typhome - 19.09.2010
Quote:
Originally Posted by [L3th4l]
Try using this:
pawn Код:
new LongString[300] = "This is the message that you will be receiving, you can also attach even more\n"); strcat(LongString, "Messages by adding a '\'n at the end of the sentence like right now\n"); strcat(LongString, "You can add as many text as you want, but this is the only way i can think\n"); strcat(LongString, "of to create this loooooooooooooooooooooooooooooooooooooooooong msgs"); ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Test", LongString, "Ok", "Close");
If you are going to use more text, increase the array size
|
At the one line ); ? must be without ) ?
Re: Input too long - [L3th4l] - 19.09.2010
Oh yea, my bad. The first lien doesn't need );
pawn Код:
new LongString[300] = "This is the message that you will be receiving, you can also attach even more\n";
Re: Input too long -
Typhome - 19.09.2010
Quote:
Originally Posted by [L3th4l]
Oh yea, my bad. The first lien doesn't need );
pawn Код:
new LongString[300] = "This is the message that you will be receiving, you can also attach even more\n";
|
Thanks now no errors. Will that work? you used that?
Re: Input too long -
Mikkel_Pedersen - 22.09.2010
Quote:
Originally Posted by [L3th4l]
Try using this:
pawn Код:
new LongString[300] = "This is the message that you will be receiving, you can also attach even more\n"); strcat(LongString, "Messages by adding a '\'n at the end of the sentence like right now\n"); strcat(LongString, "You can add as many text as you want, but this is the only way i can think\n"); strcat(LongString, "of to create this loooooooooooooooooooooooooooooooooooooooooong msgs"); ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Test", LongString, "Ok", "Close");
If you are going to use more text, increase the array size
|
OMG thanks a lot for showing this. Today i tried to make a dialog list with all weapon names and their id. And i knew that it would be too long in ShowPlayerDialog. So i made a weapons[300] = "text here"; but it still failed, so searched the forum, and found this great thread that answered my question. So thanks a lot for it.
PS: Wanna state that i also made the string size of 'weapons' bigger, but still got errors. Also first time i use 'strcat' Oo (never really needed it)