'Add' is not defined for types 'Boolean' and 'Int 32'

Error running script: Error compiling expression 'sop. Time + 1': Arithmetic element: Operation 'Add' is not defined for types 'Boolean' and 'Int 32'
The value to sop.time is neither Boolean nor Int 32.
This works in the timer if the timer is set to start at the beginning of the game, and worked before, and nothing in the script was changed, and yet it will not work after the script that enables the timer, which enables the timer as part of a verb (at % chance of success) This timer just runs the error message over and over upon successful, but otherwise still works, and once worked within the unchanged verb % of the time, but never erred.
This is the verb: if (RandomChance(30)) {
msg ("I don't know. Keep trying.")
}
else if (RandomChance(50)) {
msg ("It's still stuck. One more time?")
}
else {
MoveObject (player, Antarctic Polar Seam Channel of Unseen Sky)
}
Room Description is: EnableTimer (Cntdn)


"The value to sop.time is neither Boolean nor Int 32."
But the error message is referring to a different attribute "sop. Time" ...capital T with a space in front of it?


Oh dear, I could not copy and paste, so had to type the error message by hand and mistyped that. It should have been t. with no space.
However, I fixed the problem, late last night/ this morning. Though I still don't know why it was feisty, I fixed it, by changing the last line from (it's not open right now, but here goes) assuming Sop.time is not < 7, "Sop.time = 0" to Sop.time = Sop.time -Sop.time". For some reason, the timer is now able to be activated over and over again, whereas before it would error message after opening once or opening the first time outside of at start of game. I know this must be a bug, so I am still a bit worried, but maybe and hopefully I am just not paying attention, to some innocuous, inobvious detail.


Glad to hear the problem has disappeared. Experimentation is often the best way!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums