Sooo... I really wanted to be releasing a new module right about now, but during final testing I ran into a bug I absolutely, logically
cannot comprehend, it makes no sense in any way... I'm at the end of my rope here... So without going into too much detail, the line that crashes it is the following: @NullResponse @ChangeVar[Edges]=[Edges]+[1]
And the error says: "Conversion from string "=" to type 'Integer' is not valid." What the hell? And the strange thing is, this doesn't even always happen. The idea behind the module is that you guess the number the Domme is thinking of between 0 and 10 and then edge depending on how far off you were, so the above line exists in 10 variations with +[1] up until +[10] The weird thing is when I pick 3 it always crashes unless I get the number exactly (cause then the line won't run), but when I pick different numbers it sometimes works sometimes it doesn't even though there is
absolutely no difference code-wise... I can post the actual code, but it's a monster (I'll put the relevant part in a spoiler and remove the actual text)... Any ideas? I've checked for mistakes a million times, there aren't any, there is no reason, none whatsoever why this shouldn't work flawlessly... And it's getting frustrating, I can't even find a workaround...
- Spoiler: show
- @SetVar[Guess]=[#Random(0,10)]
[0] @SetVar[Edges]=[1] @If[Guess]=[0]Then(Direct) @If[Guess]=[1]Then(One) @If[Guess]=[2]Then(Two) @If[Guess]=[3]Then(Three) @If[Guess]=[4]Then(Four) @If[Guess]=[5]Then(Five) @If[Guess]=[6]Then(Six) @If[Guess]=[7]Then(Seven) @If[Guess]=[8]Then(Eight) @If[Guess]=[9]Then(Nine) @If[Guess]=[10]Then(Ten)
[1] @SetVar[Edges]=[2] @If[Guess]=[0]Then(One) @If[Guess]=[1]Then(Direct) @If[Guess]=[2]Then(One) @If[Guess]=[3]Then(Two) @If[Guess]=[4]Then(Three) @If[Guess]=[5]Then(Four) @If[Guess]=[6]Then(Five) @If[Guess]=[7]Then(Six) @If[Guess]=[8]Then(Seven) @If[Guess]=[9]Then(Eight) @If[Guess]=[10]Then(Nine)
[2] @SetVar[Edges]=[2] @If[Guess]=[0]Then(Two) @If[Guess]=[1]Then(One) @If[Guess]=[2]Then(Direct) @If[Guess]=[3]Then(One) @If[Guess]=[4]Then(Two) @If[Guess]=[5]Then(Three) @If[Guess]=[6]Then(Four) @If[Guess]=[7]Then(Five) @If[Guess]=[8]Then(Six) @If[Guess]=[9]Then(Seven) @If[Guess]=[10]Then(Eight)
[3] @SetVar[Edges]=[3] @If[Guess]=[0]Then(Three) @If[Guess]=[1]Then(Two) @If[Guess]=[2]Then(One) @If[Guess]=[3]Then(Direct) @If[Guess]=[4]Then(One) @If[Guess]=[5]Then(Two) @If[Guess]=[6]Then(Three) @If[Guess]=[7]Then(Four) @If[Guess]=[8]Then(Five) @If[Guess]=[9]Then(Six) @If[Guess]=[10]Then(Seven)
[4] @SetVar[Edges]=[3] @If[Guess]=[0]Then(Four) @If[Guess]=[1]Then(Three) @If[Guess]=[2]Then(Two) @If[Guess]=[3]Then(One) @If[Guess]=[4]Then(Direct) @If[Guess]=[5]Then(One) @If[Guess]=[6]Then(Two) @If[Guess]=[7]Then(Three) @If[Guess]=[8]Then(Four) @If[Guess]=[9]Then(Five) @If[Guess]=[10]Then(Six)
[5] @SetVar[Edges]=[4] @If[Guess]=[0]Then(Five) @If[Guess]=[1]Then(Four) @If[Guess]=[2]Then(Three) @If[Guess]=[3]Then(Two) @If[Guess]=[4]Then(One) @If[Guess]=[5]Then(Direct) @If[Guess]=[6]Then(One) @If[Guess]=[7]Then(Two) @If[Guess]=[8]Then(Three) @If[Guess]=[9]Then(Four) @If[Guess]=[10]Then(Five)
[6] @SetVar[Edges]=[3] @If[Guess]=[0]Then(Six) @If[Guess]=[1]Then(Five) @If[Guess]=[2]Then(Four) @If[Guess]=[3]Then(Three) @If[Guess]=[4]Then(Two) @If[Guess]=[5]Then(One) @If[Guess]=[6]Then(Direct) @If[Guess]=[7]Then(One) @If[Guess]=[8]Then(Two) @If[Guess]=[9]Then(Three) @If[Guess]=[10]Then(Four)
[7] @SetVar[Edges]=[3] @If[Guess]=[0]Then(Seven) @If[Guess]=[1]Then(Six) @If[Guess]=[2]Then(Five) @If[Guess]=[3]Then(Four) @If[Guess]=[4]Then(Three) @If[Guess]=[5]Then(Two) @If[Guess]=[6]Then(One) @If[Guess]=[7]Then(Direct) @If[Guess]=[8]Then(One) @If[Guess]=[9]Then(Two) @If[Guess]=[10]Then(Three)
[8] @SetVar[Edges]=[2] @If[Guess]=[0]Then(Eight) @If[Guess]=[1]Then(Seven) @If[Guess]=[2]Then(Six) @If[Guess]=[3]Then(Five) @If[Guess]=[4]Then(Four) @If[Guess]=[5]Then(Three) @If[Guess]=[6]Then(Two) @If[Guess]=[7]Then(One) @If[Guess]=[8]Then(Direct) @If[Guess]=[9]Then(One) @If[Guess]=[10]Then(Two)
[9] @SetVar[Edges]=[2] @If[Guess]=[0]Then(Nine) @If[Guess]=[1]Then(Eight) @If[Guess]=[2]Then(Seven) @If[Guess]=[3]Then(Six) @If[Guess]=[4]Then(Five) @If[Guess]=[5]Then(Four) @If[Guess]=[6]Then(Three) @If[Guess]=[7]Then(Two) @If[Guess]=[8]Then(One) @If[Guess]=[9]Then(Direct) @If[Guess]=[10]Then(One)
[10] @SetVar[Edges]=[1] @If[Guess]=[0]Then(Ten) @If[Guess]=[1]Then(Nine) @If[Guess]=[2]Then(Eight) @If[Guess]=[3]Then(Seven) @If[Guess]=[4]Then(Six) @If[Guess]=[5]Then(Five) @If[Guess]=[6]Then(Four) @If[Guess]=[7]Then(Three) @If[Guess]=[8]Then(Two) @If[Guess]=[9]Then(One) @If[Guess]=[10]Then(Direct)
@DifferentAnswer
(Direct)
@ShowVar[Edges] @Goto(Next)
(One)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[1]
@ShowVar[Edges] @Goto(Next)
(Two)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[2]
@ShowVar[Edges] @Goto(Next)
(Three)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[3]
@ShowVar[Edges] @Goto(Next)
(Four)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[4]
@ShowVar[Edges] @Goto(Next)
(Five)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[5]
@ShowVar[Edges] @Goto(Next)
(Six)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[6]
@ShowVar[Edges] @Goto(Next)
(Seven)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[7]
@ShowVar[Edges] @Goto(Next)
(Eight)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[8]
@ShowVar[Edges] @Goto(Next)
(Nine)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[9]
@ShowVar[Edges] @Goto(Next)
(Ten)
@ShowVar[Guess]
@NullResponse @ChangeVar[Edges]=[Edges]+[10]
@ShowVar[Edges] @Goto(Next)
EDIT: So, this thing has taken an
even stranger turn when for five seconds I thought I figured it out only to have hope (and sanity) snatched away again: I had the very far fetched idea that maybe you're just not allowed to call a Variable "Edges" cause maybe that was already used by a system thing and automatically set to a string value so using it with integer commands crashes it, so I did the following, I made a test.txt module that looked like this:
@ChangeVar[Edges]=[Edges]+[1]
@ShowVar[Edges]
And sure enough, it crashed. So then I changed it to this:
@ChangeVar[Edging]=[Edging]+[1]
@ShowVar[Edging]
And lo and behold... it worked! It spat out a single one and with it hope! So I replaced all the [Edges] variables in my module with [Edging] and began typing the grand story of how I tried a whole afternoon to fight some elusive bug only to finally find the problem... but then when I tried to run it, it still crashed. And now here's the
strange part. After that happened I once again tried to run the test.txt module, the one with [Edging] and... It
also crashed! So not only does my module not work, it actively
corrupts any variable it uses in the place of [Edges] and makes it so that any further use of that variable in
any module even after a reset or restart will crash the program... What is going on here?