Noticed this bug recently. Any prop with a string as a result seems to have trouble being read, not saved.
It's saved within a structure, so it might be the structures that are bugged. This is what i basically have to save to a datafile.
var structure
structure.+thing := "a space!"
element.setprop("test", structure)
Now opening up the actual data file reveals that this saves perfectly.
However this...
Print(element.getprop("test").thing)
will return <"uninitialized object"> on EVERY string that has a space. I've tried saving the string in an array like.
structure.+thing := {"a space!"}
and Print(element.getprop("test").thing) still returns <"uninitialized object"> for any string with a space. Every other string is returned as {string}, works fine.
I then tried what the result of
res := SplitWords("a space!")
structure.+thing := res
And that returns <"uninitialized object"> too. So with an array with 2 words, no spaces it returns this error
hmm
So it's either a bug with accessing data files, or a bug with structures, OR a bug with structures IN datafiles Either way, I wasted enough time on it so someone else can test if they want. From the responses in my other bug report, it's kinda pointless reporting bugs anyway
Reading strings with spaces in datafiles
Moderator: POL Developer
-
- New User
- Posts: 13
- Joined: Wed May 16, 2012 5:19 pm
Re: Reading strings with spaces in datafiles
I think that prop names don't "allow" spaces inside.
-
- New User
- Posts: 13
- Joined: Wed May 16, 2012 5:19 pm
Re: Reading strings with spaces in datafiles
They allow spaces fine.xeon wrote:I think that prop names don't "allow" spaces inside.
I just made a test command and it's working perfectly there. I'm stumped on this now. Something I failed to mention is that the data file was created in POL093 and used in 098. All other methods of accessing worked though.
Guess I'll put it down to me