Save arrays with live set
Hey There!
I deleted my previous posts here (sorry I can't make em go away) after finding the "save" function in "Basic Techniques" - now I'm back because it still won't work. Meanwhile, it's not about saving 2D-Arrays anymore, just about saving _anything_. I copied the code of the tutorial, still: nope. Please help, it's my first week with JS. So, this is the code:
----
autowatch = 1;
var numcowbells = 1;
function cowbells(a)
{
numcowbells = a;
}
function save()
{
embedmessage("cowbells", numcowbells);
}
function frag()
{
post(numcowbells);
}
---
Function frag ist just for checking.
The first time it actually saved the number I put in the cowbells function, that was it. Since then I always get back that first number (5 if you wanna know ;)).
What I tried: Reopening the patcher, reopening max, reopening Live, reopening Live and Max, Saving the device and reloading it, saving the device as a preset and reloading it and so on, all with and without autowatch. It keeps returning that initially saved number 5, all other numbers after that won't be saved. I checked that "cowbells" changed with the frag-function everytime.
I know this is easy. That's why I'm near tears by now. Please help.
Oh and about that 2D-Array I originally intended to save: Please let me know if that's a good idea.
Thanks a lot,
rerere