EditorPlugins scripting issues

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

EditorPlugins scripting issues

Post by Florenzius »

Hey,

I need help too. Idk what's wrong. It's the right format...

It doesn't brings an error, but it's not showed in my editor...

Code: Select all

#RequireContext CEditorPlugin

Text CreateManialink()
{
	declare Integer MaxBlocksCount for ManialinkPage;
	declare Ident[Integer] BlockModelIds for ManialinkPage;
	declare Text[Integer] BlockModelNames for ManialinkPage;
	//Working
	declare MLText = """
	<quad posn="-138 20.5 1" sizen="9 9" bgcolor="FFFA" style="Icons64x64_1" substyle="ArrowDisabled" rot="-3"/>
	<quad posn="-58 24.8 1" sizen="9 9" bgcolor="FFFA" style="Icons64x64_1" substyle="ArrowNext" rot="-3"/>
	<label posn="-115 19 0" sizen="44 5" text="THE PERFECT MAP" rot="-3"/>
	<label posn="-129.5 -23 0" sizen="66 4" text="Pluginversion 0.1.1 by $069ԍτx$fff»$i$069f$ffflorǝи$069ɀ$fffιus" rot="-3" tex		tsize="1"/>
	<label posn="-132 9 0" sizen="80 5" text="Welcome to your new mapping-coach!" rot="-3" textsize="3" autonewline="1"/>
	<label posn="-130 -18 0" sizen="80 5" text="Good luck and have fun! :)" rot="-3" textsize="3" autonewline="1"/><label posn		="-131 1 0" sizen="81 17" text="In this short guide you will learn some cool tricks for perfect maps. In <number> sites yo		u'll get the best tricks and some example pictures and maps to test!" rot="-3" textsize="2" autonewline="1"/>
	<quad posn="-141 23 0" sizen="95 14" bgcolor="FFFA" style="Bgs1InRace" substyle="BgTitle3_4" rot="-3"/>
	<quad posn="-141 23 0" sizen="95 14" bgcolor="FFFA" style="Bgs1InRace" substyle="BgTitle3_4" rot="-3"/>
	<quad posn="-138.5 18 -1" sizen="90.5 78" bgcolor="FFFA" style="Bgs1InRace" substyle="BgGradTop" rot="-3"/>	""";
	return MLText;
}

main() {
	// Without multiples layers :
	ManialinkText = CreateManialink();
	// With 
	declare Layer1 <=> UILayerCreate();
	Layer1.ManialinkPage = CreateManialink();
}

//Test
//If you can help me, you can choose between kek and pasta
Who can help me gets a kek ;)

Thanks :D :thx:
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: EditorPlugin doens´t show my manialink [fixed]

Post by maxi031 »

ManiaDesign wrote:Hey,

I need help too. Idk what's wrong. It's the right format...

It doesn't brings an error, but it's not showed in my editor...
Your plugin is fine, you have some typos in manialink that is why you do not get any compiler error.
Pay attention next time to manialink strings, it is very easy to make little typo that will cancel whole manialink.
Next time if your plugin compiles but does not displays manialink look for typos in your manialink string.

Here is your code fixed:

Code: Select all

#RequireContext CEditorPlugin

Text CreateManialink()
{
   declare Integer MaxBlocksCount for ManialinkPage;
   declare Ident[Integer] BlockModelIds for ManialinkPage;
   declare Text[Integer] BlockModelNames for ManialinkPage;
   //Working
   declare MLText = """

	<quad posn="-138 20.5 1" sizen="9 9" bgcolor="FFFA" style="Icons64x64_1" substyle="ArrowDisabled" rot="-3"/>
	<quad posn="-58 24.8 1" sizen="9 9" bgcolor="FFFA" style="Icons64x64_1" substyle="ArrowNext" rot="-3"/>
	<label posn="-115 19 0" sizen="44 5" text="THE PERFECT MAP" rot="-3"/>
	<label posn="-129.5 -23 0" sizen="66 4" text="Pluginversion 0.1.1 by $069ԍτx$fff»$i$069f$ffflorǝи$069ɀ$fffιus" rot="-3" size="1"/>
	<label posn="-132 9 0" sizen="80 5" text="Welcome to your new mapping-coach!" rot="-3" textsize="3" autonewline="1"/>
	<label posn="-130 -18 0" sizen="80 5" text="Good luck and have fun! :)" rot="-3" textsize="3" autonewline="1"/>
	<label posn="-131 1 0" sizen="81 17" text="In this short guide you will learn some cool tricks for perfect maps. In <number> sites yo      u'll get the best tricks and some example pictures and maps to test!" rot="-3" textsize="2" autonewline="1"/>
	<quad posn="-141 23 0" sizen="95 14" bgcolor="FFFA" style="Bgs1InRace" substyle="BgTitle3_4" rot="-3"/>
	<quad posn="-141 23 0" sizen="95 14" bgcolor="FFFA" style="Bgs1InRace" substyle="BgTitle3_4" rot="-3"/>
	<quad posn="-138.5 18 -1" sizen="90.5 78" bgcolor="FFFA" style="Bgs1InRace" substyle="BgGradTop" rot="-3"/>  
	""";
   return MLText;
}

main() {
   // Without multiples layers :
   ManialinkText = CreateManialink();
   // With
   declare Layer1 <=> UILayerCreate();
   Layer1.ManialinkPage = CreateManialink();
}

//Test
//If you can help me, you can choose between kek and pasta
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: EditorPlugin doens´t show my manialink [fixed]

Post by Florenzius »

Many thanks mate :D :thx:
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: EditorPlugin doens´t show my manialink [fixed]

Post by Florenzius »

Hm, i have a problem again. My interface-file is done completely. You can test it by activating and deactivating the frames (pages).

In the manialink section in my plugin, there's the script part. I set the id for it. (id="Next1") and in the script in the manialink I wrote that:

ay

I don't have menuButton2, but it should work anyway. (It's just as placeholder). I think the script is okay, but idk why the button doesn't work in my plugin...

Here the complete script file.

ay

The complete interface-file (but WITHOUT the script section, i only added it in the editor plugin)

ay

I hope you can understand me well and i would be happy if you can help me ;)
As in the last line, you can get cool prices!

EDIT: It doesn't work in the interface designer too :/
EDIT2: PLEASE only test the scripts, if you can help. I don't want to spoil my project!!!
Last edited by Florenzius on 11 Jun 2016, 19:47, edited 1 time in total.
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: EditorPlugin doens´t show my manialink [fixed]

Post by maxi031 »

You need to add scriptevents="1" attribute to your button quad if you want it to fire mouseclick event.
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: EditorPlugin doens´t show my manialink [fixed]

Post by Florenzius »

Thanks, it works well.

But, (don't ask , wheter I am stupid...) i have th enext problem ^^

No compiling error, all is right, but the script is not showed. scriptevent and id worked, but after a big edit It isn't showed as interface. Activated=yes, but it's like hidden...

Please don't test it, if you can't help, it's secret...

ay
Last edited by Florenzius on 12 Jun 2016, 07:46, edited 1 time in total.
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: EditorPlugin doens´t show my manialink [fixed]

Post by maxi031 »

DUDE you are missing " after Id attribute at line 301.
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: EditorPlugins scripting issues

Post by Florenzius »

Thanks dude for your help, I couldn't see all small letters in 600 lines of code^^ Thanks :D

Now I get the following error: "The multilined string is too long (a """ is probably missing)"

But my code is okay and no """ is missing. Here is a screenshot with my code and the error message. The "wrong" line is marked by MP.

http://i.imgur.com/2xC3s9k.jpg

I can't find any error in the other pages, it's probably just this line, but it's weird
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: EditorPlugins scripting issues

Post by maxi031 »

DUDEEE post code.
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: EditorPlugins scripting issues

Post by Florenzius »

Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 2 guests