Hi all,
here are some things I think it might help you.
You need to initialize a data array before using a data array set up, to avoid conflicts with the Hal program and plug-ins.
You need to make sure that the words that you are using for your variable data array is not being used by any part of Hal, or any other plug-in.
This is an example from the free will plug-in, I'm using this example specifically because of the VR letters, this will be explained later.
' Initialize variables
'------------------
Dim vrHalQuery() 'We must declare an empty array to store query results in
Dim vrChoiceTopic, vrItem, vrItem1, vrItem2, vrNumChoice1, vrNumChoice2
Dim vrChoice1, vrChoice2, vrAdviceTopic, vrObedience, vrLaw
here's an example from the free will plug in, this particular example will help those that don't understand that you have to press the apply button before you press the okay button.
' If the user checked this plugin but never clicked on "Apply changes" button
' he might get an error, so I create a default parameter table
'------------------
vrTableName = "vrParameter"
vrObey = "OBEY"
vrObedience = 5
If HalBrain.CheckTableExistence(vrTableName) = False Then
HalBrain.ReadOnlyMode = False
HalBrain.CreateTable vrTableName, "TopicSearch", "miscData"
HalBrain.AddToTable vrTableName, "TopicSearch", vrObey, vrObedience
End If
all this actually did was set the obedience level to normal and saved it in a data array for later reference, a very useful tool if you're going to be using data array.
I highly recommend that anyone is going to use data array to implement this in their plug-in.
One of things that I would like to bring up is that you do not have to use the letters VR in front of the words it is just what the author of free will chose to use.
And if you use the free will plug-in and you use the VR in front of the words you'll find you'll get some major conflict between the two plug-ins.
So I suggest either removing the VR or even better still substituting the VR for two different letters like SM or UB to avoid conflicts.
Sincerely, a data munching cruncher.
C load.