Page 1 of 1
transfering variables from one .cml to other
Posted: Sun Dec 07, 2014 3:28 pm
by Edz
Hallo,
is it possible to transfer one global variable into the next xml file.
Re: transfering variables from one .cml to other
Posted: Sun Dec 07, 2014 5:05 pm
by BlubBlab
What do you mean by that? In theory you can save a var in a file between the run of 2 files.
Yeah I know this would be a lot of overhead I wrote an extension for MM2 which would solve it for that but for MM and RomBot I don't see an easy solution.
Re: transfering variables from one .cml to other
Posted: Sun Dec 07, 2014 8:40 pm
by rock5
An easy solution would be to keep all the values you want to keep in a table then save the table using the table.save command, eg.
Code: Select all
table.save(mySavedValues,"filename.txt")
Then when you want to load them again use
Code: Select all
mySavedValues = table.load("filename.txt")
Re: transfering variables from one .cml to other
Posted: Wed Dec 10, 2014 1:34 am
by Edz
Thanks Rock.
Sry for my bad english but know what i meen

Re: transfering variables from one .cml to other
Posted: Sat Dec 13, 2014 12:42 am
by Bot_romka
I used userfunction addon_Variables.lua and include there all needed global Variables.