Just been running randomtest on my edited version of UnNatural. and came across an odd error, it’d throw up an error message regarding a token exception yet running it again it seems to pass. this has happened a few times this evening. First it was giving an error that *selectable_if wasn’t a valid command so i switched it to an *if and now get the token error.
Is there something with randomtest that can fail something but pass it on a second test?
Random test plays through one iteration of your game. It may not take the path that the error is in. It’s better to test with quick test first, then when that passes, move to random test.
It sounds like the code for the selectable_if has been placed incorrectly. Selectable_if, by its nature, is obviously only usable in a choice and the error is asifits being used in the wrong place. If you want to post the code we can take a look.
Another thought: as the error appears sometimes but not all… yet it passes quick test, is your choicescript uptodate and accurate? It might be worth downloading the latest version. Be sure only to copy the scenes folder and any images / sound files across. Don’t copy the index.html file.
I’m sure you have already thought of these but doesn’t hurt to say just in case
I’ll post the code in a minute. Just got back home from doing a shopping run.
*if (form > 20)
#I create a scythe out of shade.
*set form_weapon form_scythe
*set form_scythe %+5
*if (physical + werewolf_lore) >50
You swing the scythe in a deadly arch. The curved blade buries itself into the beast's side.
You twist it, before bringing the blade up suddenly. The vicious motion splits the wolf, and his heart, in two.
*goto wolf_corpse
*else
*if (rapport >25)
*goto save_me
You try to slash the werewolf, but he avoids your clumsy attack. The werewolf bats the weapon aside, tackling you to the ground. You land hard. The weapon dissipates, and you can't bring it back quickly enough to stop the beast's pounce. You scream as he digs sharp claws into your body. Struggling is useless. A violent swipe of his claw tears your throat open. The last thing you feel is his hot breath and a sharp pain in your side.
*if save_game = true
*page_break Restart Episode Three Part Two
*set save_flag 2
*set return_to_scene "threea"
*goto_scene savegame
*else
*ending
I had left the *if on the same line so i dropped it to the next line and now get the error about dropping out an *if block,
I’m using CSIDE atm so am waiting for the new version to get updated,
I don’t know if you already solved the problem but I got this and after banging my head through all different types of material, finally found out that my problem was that I only had *selectable_if choices. I.e
I put it on same line and the token error has gone. That just leaves the original odd error. Just running Random test again to see if I can find it again.
I find it goes quicker if you don’t show choices or text then if it errors just do choices/text for the deed that error.
Edit: just errored on seed 1928 invalid expression couldn’t extract another token. Now running Random test on seed by itself and it passes. This is the odd quirk i found
Maybe try deselecting the ‘avoid used options’ button and see if that affects the odd quirk? Or start at seed 1900 and see if you hit the error?
It may be that the seeds play out in a different order depending on how many used options they’ve been through in previous iterations and are now avoiding. (Although I don’t know, I’m really just guessing and may be way off here.)
Also, have you tried following the choice tree up to that error and then using CSIDE’s step through function to figure out exactly what is causing the bug? I’ve caught a few errors that way that I was having quite a lot of trouble catching, ones that passed Quicktest but not Randomtest.