#Empty XML table

1 messages ยท Page 1 of 1 (latest)

lilac basin
#

and does it return something from .getXml() ?

opal canopy
#

haven't tried that. i also don't remember how to print the type, i'm still trying to figure that out

pulsar heart
#

it takes a frame or two before you can access the xml you just set.

opal canopy
#

and this WAS working yesterday

wheat wedge
#

And you're sure it's there? It's shown in the save/atom?

opal canopy
#

you mean, like this?

#

yeah, its there

wheat wedge
opal canopy
#

yeah

lilac basin
#

timing related stuff can break randomly

type(something) returns the type BTW, a string

pulsar heart
#
varName = "Hello world!"
print("varName = \n"..logString(type(varName)).."\n"..varName)
varName = 
string
Hello World!
opal canopy
#

it's type is a table

#

oh, hold up. it IS returning nil

#

it's a nil table

lilac basin
#

no, it's either nil or a table :P

opal canopy
#

type is table

lilac basin
#

cool, cool

#

then it's an empty table

opal canopy
#

yes, sorry

#

print(logString(UI.getXml()))
this returns nothing as well

pulsar heart
#

it doesn't return "nothing"

#

it returns an empty string

opal canopy
#

sure

#

indeed

lilac basin
#

just in the fucking cosmic case some freaky character broke log printing, you can do e.g.

local size = 0
for _ in pairs(xmlTable) do
    size = size + 1
end
print('Size is ' .. size)
#

but I reaaaaly doubt it

opal canopy
#

size is 0

#

zero

lilac basin
#

yeah, and what if you do the getXmlTable again inside that Wait you had there?

#

after 3 seconds or something it was, right?

opal canopy
#

ok, ill try it

#

prints nil still

pulsar heart
#

I wonder if something in your defaults is breaking the xml so that it doesn't throw an error but also doesn't render, so that you end up with "no" xml

lilac basin
#

ohh, it doesn't render?

opal canopy
#

yeah, sure. ill check

pulsar heart
#

if you replace your whole xml with just <Panel/> what do your logs show then?

opal canopy
#

i removed everything from defaults, still returns nil

#

im gonna remove everything now, and add jsut a panel

#

wow! stil nil!!

wheat wedge
#

just to be very sure.
Nothing in your code is actually writing xml at any point?

opal canopy
#

not at this point, no

#

i am obtaining getXmlTable in order to write xml, but it's not happening at this point

#

and i can't now, because this is weirdly broken

lilac basin
#

shoot up a save
it's probably something dumb that we just overlooked

#

a minimal save :P

opal canopy
#

ok, that means my json file, right?

lilac basin
#

yeah, or if it can be reproduced on a single object, it can be a json of this saved object

opal canopy
#

sadly, this is all global ui xml

lilac basin
#

BTW I love this threads thing
it would be a nightmare to both parties continued on the main channel

opal canopy
lilac basin
#

where do I look for this log?

#

which script I mean

#

ohhh crap it probably folded down to a require

opal canopy
#

i feel like you're asking me which "file" the script is in? its in the "UI Functions" file, the addXmlViaCode function

lilac basin
#

yeah, it's just I don't have your source files tree and for me it just collapses into requires

opal canopy
#

oh, ok

lilac basin
#

grr and I can't expand them via Ctrl+Z anymore

opal canopy
#

would you WANT me to send you my "files"?

lilac basin
#

do you also see that in the console tab

#

I dunno wtf is going on, I replaced it all with a simple panel + text

opal canopy
#

no, i don't get any errors

#

unless i try to access the xmlTable variable (which is nil)

lilac basin
#

I removed everything in Global UI with a simple Text and it's still not rendering and erroring in console

opal canopy
#

now, i just opened a new save, made a new ui xml

#

and printed the getXmlTable just fine, in that new save

#

without any of my code

pulsar heart
#

do you really have @ and > symbols in your xml classes?

#

I'm not saying this is the cause, but your xml is pretty involved (I already knew it would be by your previous posts in #scripting to be fair)

opal canopy
#

i haven't made any changes to the xml today

#

and this WAS working yesterday

#

with the @, the >, and everything else

lilac basin
#

can someone check if it shows any Global XML for you?

#

I've deleted everything

#

and I stil get the fucking console error posted above

pulsar heart
#

not sure if I want to now ๐Ÿ˜…

#

i had one persistent bug in TTS and after taking weeks of getting it fixed I'm not prepared to risk another

lilac basin
#

@opal canopy did you change or edit any custom assets?

#

between when it worked and now

opal canopy
#

yes, i did

lilac basin
#

as in, UI assets

opal canopy
#

i did, yes

lilac basin
#

!!
which ones?

opal canopy
#

like 83 of them

lilac basin
#

lol

opal canopy
#

i reloaded them up

#

is that the issue?

lilac basin
#

yep I removed them all and it works now

opal canopy
#

oh, awesome! what should i do?

lilac basin
#

I guess remove them :D

#

and maybe re-check after every upload

#

soo have fun doing that 83 times?

opal canopy
#

lol!!

#

mmmk

lilac basin
#

PS. you can do that in the save file instead of clicking dot dot dot -> delete on every single one via UI first

opal canopy
#

in the json? ok

lilac basin
#

honestly I have no idea
I noticed this error

opal canopy
#

yeah, i'm seeing that now too

pulsar heart
#

or use .setCustomAssets() or the second parameter in setXmlTable() or setXml()

lilac basin
#

then apparently that does something with custom assets

#

aaand thet's the extent of knowledge we can ever have

#

post a Nolt ticket maybe if you nail down which one did that

opal canopy
#

lol! how do i find these in the json? sorry

lilac basin
opal canopy
#

ok, yeah, i see it now

lilac basin
#

make that

#

yeah .setCustomAssets wouldn't even need deleting them first, Bone is right, I brainfarted

opal canopy
#

you know what? its ok

pulsar heart
opal canopy
#

i'd rather start with it in working condition ๐Ÿ˜‰

lilac basin
#

I also looked through your UI assets menu and every single one of them correctly loaded a thumbnail

#

so it's probably not a simple as a broken link etc

#

maybe a weird filename screws that up?

opal canopy
#

yes, i found a weird file name

#

ill fix it,

#

but i'm still getting errors on my end

#

my table is still null

#

hang on... it didn't save...

#

there

#

it works now! ill just reload my custom assets and see what happens! ๐Ÿ™‚

#

in the JSON file, there was an error with a bad mix of an ' and a " in the Grimms' Fairy Tales asset

lilac basin
#

how's it possible
did you add them manually into the JSON?

pulsar heart
#

possible charset / regional character difference in the filename?

opal canopy
#

no, i added them using setCustomAsset

#

i myself must've messed it up though in the table

pulsar heart
#

wowza, you think the parser would catch that with some other error

opal canopy
#

agreed

pulsar heart
#

good spot though

lilac basin
#

ohh man I thought you had it right in the table, and some weird char in name made it read malformed like that

#

I would've spent the night trying to break TTS ins some fun way using that if that was the case lol

pulsar heart
#

that entire line is pretty crappy in the JSON though

opal canopy
#

indeed! i fixed it. would NEVER have thought of that, dzi. thank you SO MUCH!