Non-existent variable error when I upload but not before that

Hi I’m having trouble with a non-existent variable “cooking”.

The strange thing is that when I play/read the game locally it works, but when I upload (I use moodyink) it catches the error “non-existent variable” , whenever I try to access the stats screen.

Here is a picture of the error (cooking is located in “learnt skills”):

And here is a picture of it being visible locally:

My code looks like this:

(Startup)

*create name "unknown"
*create unique_nickname false
*create title "unknown"
*create nickname "unknown"
*create gender "unknown"
*create sex "unknown"
*create age "0"
*create noble 0
*create health 0
*create strength 0
*create agility 0
*create trim 0

*create cooking "No"
*create dancing "No"
*create tracking "No"

*create aeos 0
*create attire "unknown"
*create head "unknown"
*create bodice "unknown"
*create legs "unknown"
*create feet "unknown"
*create weapons "none"

Thank you, for reading this far
(Stats)

This is a stats screen!

*label stat
*stat_chart
  text Name
  text Title
  text Nickname
  text Age
  text Gender

  percent Health
  percent Noble
  percent Strength
  percent Agility
  opposed_pair trim
    shabby
  text Aeos

*choice
  #Attire  
    *goto screen

  #Learnt Skills
    *goto learnt_skills

*label screen
*stat_chart
  text Head
  text Bodice
  text Legs
  text Feet
  text Weapons

*choice
  #Stats screen
    *goto stat

*label learnt_skills

[b]LEARNT SKILLS:[/b]

*stat_chart
  text Cooking
  text Dancing
  text Tracking
  
*choice
  #Stats screen
    *goto stat
  

Try force-refresh the browser tab so it loads all the newly uploaded files. Sometimes the tab uses the files in memory and that can cause problems.

Also, check the uploaded files so you know they are the ones you uploaded last.

1 Like

The stats screen “cooking” is capitalized, the start up file’s variable is not.

2 Likes

Mind expanding more on this…(if there is something to expand on) because I just clicked the reload icon on browser before and after upload the files. But it didn’t seem to work…

The hosting sites do take a bit of time to refresh their uploaded content.

I tried that and all my other variables are capitalised in stats, so I don’t think that’s the case or they also wouldn’t work.

I think in this case Eiwynn has the right answer, the variable names aren’t the same.

What I was referring to was the case when you upload a modified file and go back to the tab where you have the game open and restart it or refresh it with F5. Sometimes the browser refreshes the page using the temporal files that are downloaded on your PC, so the newly uploaded file isn’t loaded.

That’s why you should try to force reload the tab every time you upload a modified file.

1 Like

This wiki page might be of help:

Basically, it would (I believe) flag the others, once this is corrected.

2 Likes

Thanks yall. This helped, I had to delete cache files.

3 Likes

You can usually force refresh with ctrl + F5, but look for the correct hotkey for the browser you’re using. You shouldn’t need to delete the cache that way. Glad it worked.

1 Like

Just out of curiosity, were you loading a saved game when testing after the upload?

1 Like

Oh, I type on VSCode (Visual Studio Code).

It has this feature (Go Live):
golive

Which displays the story/game on your browser, while you are a typing.
You can also do it, to read/play through it.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.