I’m working on a game, but in the index whenever it gets to a stat an error pops up and says non-existent variable. My mygame file is this:
`
stats = {
killed_cockroach: “false”
,ogre: “false”
,pencil: “false”
};
//debugStats = stats
`
And every time I write *set killed_cockroach true or change any stats I get this error. Why?
Remove the quotations from values of the variables in the stats if you are doing boolean variables OR use quotations around the values when you set the variable. True/false are best without quotes.
Hm, I’m not sure what’s going on. Can you copy the exact error you get? Also, you write ‘*set killed_cockroach true’ you’re not capitalizing anything at all, right?
Hold on. I got it. One of the lines said killed_rock and that caused ALL of the variables to stop working. It was autocorrect’s fault, and mine for not catching it. Dang, I feel dumb. Works now.