posts from @Escape-Element tagged #web export

also:

Good News:
I have found the code that is causing the problem.

Bad News:
It's still weird.

When selecting the speaker and topic I had:

var cur_topic: String = str(topicsRemaining.pop_back()[0])
var cur_player: String = str(playersRemaining.pop_back()[0])

Which on the desktop returned the string value from the appropriate array.
I didn’t expect to have to use the [0] but if I didn’t the speaker and topic still had brackets around them: ex: ["The Topic Text"]

The web however HATES the str(playersRemaining.pop_back()[0]) syntax apparently.
It stopped doing anything in protest.

So I tried:

var cur_topic: String = str(topicsRemaining.pop_back())
var cur_player: String = str(playersRemaining.pop_back())

On the desktop I still got the messy result:

["The Topic Text"]

And on the web export I get:

<null>

I then thought maybe trying to stringify it right away was an issue so I changed it to:

var cur_topic = topicsRemaining.pop_back()
var cur_player = playersRemaining.pop_back() 

and did the string casting later:

YourTurn(str(cur_topic[0]),str(cur_player[0]))

It stoped doing anytihng again.
If I removed the [0] it once again shows

<null>

So pop_back() is the weak link?
pop_front() has the same results.
so does pop_at()

I suppose it could also be that the base data sets appear empty to the web version. The project has an autoload script that loads CSV files into the two data sets.

Hmmm ... 🤔