Is it possible to write to array from within a behavior?
I can't make it work. It creates the file but writes nothing to it.
Printable View
Is it possible to write to array from within a behavior?
I can't make it work. It creates the file but writes nothing to it.
Are you writing Strings to the array or values? I've had problems with the former before.
I'm using a "number array" and writing numbers to it.
I's no big deal I can solve it another way, just wanted to know if one is suppose to be able to do it or not.
If not I'l stop trying. [smile]
Weird, I don't see why you shouldn't be able to write from within a behavior, it's probably due to something else.
Starting fresh this morning. [smile]
Throwing away the array file letting the app create a new one fixed the problem.
A little "worry cloud" on the sky here: what is corrupting the array file?
It worries me if this can happen when users are in the middle of their games loosing a lot of data.
No idea... Let me know if you can reproduce it.
I found this with the Tray Icon object as well, had to delete the object and re-create it. Might want to check this too Yves. I don't have the old code but Everytime I want to 'Fix the issues I have. Deleting the object and re adding it in seems a little harsh because I have to re-create the events associated with it.
Will do Yves.Quote:
Originally Posted by Yves
DJFuego, I don't have to delete the array object itself only the array file created by the object.
I have found the reason for this to happen. User error as usual, I'm such a card board head! [wink]
Write a value while the array is still "text array".
The file is created.
If one then changes the array object to "number array" without throwing away the corrupt array file it will not work.
I haven't tested the other way round but it ought to act the same.
Hmm. I didn't realize until now that there was an option to change from text to numeric array at all, actually... I'm having a similar feeling of having done something a bit stupid.
You should try renaming the 1st object and create another one, than in the event editor right click the 1st object and select "Replace by another object."Quote:
I found this with the Tray Icon object as well, had to delete the object and re-create it. Might want to check this too Yves. I don't have the old code but Everytime I want to 'Fix the issues I have. Deleting the object and re adding it in seems a little harsh because I have to re-create the events associated with it.