[HELP] The multilined string is too long

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
adamkooo2
Posts: 1318
Joined: 13 Jun 2014, 08:43
Location: Slovakia
Contact:

[HELP] The multilined string is too long

Post by adamkooo2 »

Hello!

The Maniascript shows me an error because the declared manialink text is too long.
This is my menu maniascript:

Code: Select all

#RequireContext CManiaAppTitle
#Const ScriptName "Solo.Script.txt"

Text MainView2() {
	return """veeeeeeeery long ML (1200 lines)
	""";
	}

main() {
10 lines of code
}
An error is shown:

Code: Select all

ERROR [529, 161] The multilined string is too long (a '"""' is probably missing)
ERROR [529, 161] syntax error, unexpected NADEO_LEX_ERROR
Can you help me with that please?
Last edited by adamkooo2 on 05 Jan 2018, 14:28, edited 1 time in total.
/\rkady
Image
User avatar
Miss
Posts: 2151
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: [HELP] The multilined string is too long

Post by Miss »

I mean.. your snippet there shows "", not """.
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
User avatar
adamkooo2
Posts: 1318
Joined: 13 Jun 2014, 08:43
Location: Slovakia
Contact:

Re: [HELP] The multilined string is too long

Post by adamkooo2 »

Miss wrote: 05 Jan 2018, 13:57 I mean.. your snippet there shows "", not """.
I copied it wrong,
in script it's written right, but it doesn't work
/\rkady
Image
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: [HELP] The multilined string is too long

Post by reaby »

Maybe you could split it to smaller chunks ?

Code: Select all

declare xml = """ code """;
xml ^= """ more code""";
xml ^=  """ even more code""";

return xml; 
User avatar
adamkooo2
Posts: 1318
Joined: 13 Jun 2014, 08:43
Location: Slovakia
Contact:

Re: [HELP] The multilined string is too long

Post by adamkooo2 »

reaby wrote: 05 Jan 2018, 16:04 Maybe you could split it to smaller chunks ?
Well, no error is shown, but no manialink is displayed...

here's my maniascript (full) if you want to know more:
https://drive.google.com/file/d/1bs5cUR ... sp=sharing
/\rkady
Image
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: [HELP] The multilined string is too long

Post by reaby »

I'm not familiar with manialink layers, but don't you need to show the layer ?
Looks like you create layer, but you don't attach it anything... do you need to do that ?
User avatar
Qlex
Posts: 239
Joined: 03 Jun 2012, 13:17

Re: [HELP] The multilined string is too long

Post by Qlex »

Hi,

Thank you for your report.

First of all, you might want to put all of your xml inside a manialink tag :

Code: Select all

<manialink version="3" name="MyLayerName">
Veeery long ML
</manialink>
Second of all, I think the layer is too big (too many frames, quads, labels etc). I recommend creating a new layer for each navigation page. I see you have tried something like this for LayerSoloPuzzle. Are you using this layer?
User avatar
adamkooo2
Posts: 1318
Joined: 13 Jun 2014, 08:43
Location: Slovakia
Contact:

Re: [HELP] The multilined string is too long

Post by adamkooo2 »

OK, I will split the manialink into more manialinks - solo platform, solo stunt, solo puzzle) and solo race (+ rank chart) and I will try to make the campaign tracks display with script and also try to show medal progress. Maybe I will ask here on forums if a problem will appear. I have done rank position chart.
Image
Image

Thanks for your help :thx:
/\rkady
Image
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest