Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: ll420ll on May 24, 2009, 09:49:27 pm

Title: customem & saving variables (HELP)
Post by: ll420ll on May 24, 2009, 09:49:27 pm
I'm working on on plug-in and I could uses a lil help.

I found this topic, but i am still having issues.
I think i should be able to save a variable using custommem
Like this...
CustomMem = HalBrain.EncodeVar(MyTable, "MyVariableName")
StoredVariables = HalBrain.ExtractVar(CustomMem, "MyVariableName")

I very new at this, but im starting to figure some things out.
If i can make this work, I will have one neat plugin to share later.
Thanks for the help!!!
Title: customem & saving variables (HELP)
Post by: ll420ll on May 28, 2009, 02:23:37 am
I see what I did, vrossi answered this in a post about Hal emotions plug-in.

Rem PLUGIN: CUSTOMMEM
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
'------------------
' Loads stored variables
'------------------
vrNight = HalBrain.ExtractVar(CustomMem, "vrNight")

Rem PLUGIN: CUSTOMMEM2
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
'------------------
' Saves stored variables
'------------------
CustomMem = CustomMem & HalBrain.EncodeVar(vrNight, "vrNight")
Title: customem & saving variables (HELP)
Post by: snowman on May 30, 2009, 04:49:40 pm
I think the reason no one has even attempted to answer your post is because no one knows the answer...

Good Job ll420ll on stumping the establishment.

[:)]