Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Have a error report that won't go away even when *fixed*

edited April 2016 in Help! with 2.0
So I get an error when testing my game.

Error: <<set>>: bad evaluation: Cannot read property '1' of undefined
And of course I checked and found a misspelled variable, but after correcting the misspelled variable I get the same message and hovering over the message brings up the same variable with the same spelling before I corrected it. Like this:

Before fix:
$CastlePrint to $CasstleSize

After fix:
$CastlePrint to $CastleSize

the error message still displays the first, but that is not what it says in my code:
<<set
$CastleSize to 1
$CastlePrint to $CastleSize

>>

I have tried rewriting the entire statement and copy pasting the correct spelling and closing twine to restart, but that doesn't do anything.

Comments

  • edited April 2016
    edit: I changed my comment after you changed your third example.

    I am still assuming you are using SugarCube 2.5.0 and I am still having trouble duplicating your error.

    You should place a semi-colon between each assignment if you have more than one within a <<set>> macro:
    <<set $CastleSize to 1; $CastlePrint to $CastleSize>>
    
  • Yeah sorry I should have mentioned that I'm using sugarcube 2.5.0

    And goddammit I thought an error like that wouldn't just happen and it hasn't. I'm just stupid. I used the same exact code with the error in another place so of course fixing only one place wouldn't do anything.
Sign In or Register to comment.