plotscript, newgame password, begin
time loop := false
suspend player
$3 = "BONUS"
input string(2,5)
if (string compare(2,3) == true) then (
show text box(278)
wait for text box
)
show text box(277)
wait for text box
resume player
time loop := true
end
It compiles, but the string is permanently stuck on screen and the string compare won't come up true.
That the string isn't hidden after "input string" is actually a bug that's fixed in currently nightlies. You can just add "hide string (2)" after it as a workaround.
I don't know why the string doesn't compare as equal. You can try adding
after "input string" to cause it to show entered password in the bottom corner of the screen. Then you can check that the string you entered actually registered displays as 'BONUS' (with the apostrophes, but without any extra whitespace or anything).
Last edited by TMC on Fri Jun 08, 2012 3:07 am, edited 1 time in total.
Oh! I just remembered another bug that's been fixed in Alectormancy: stringcompare used to return -1 instead of 1 on equality. As a workaround, get rid of the "== true". It's bad practice to write that anyway (partially because there may be more commands with that bug -- we never checked all of them -- and partially because a command might be documented to return some other value without you realising).
Last edited by TMC on Fri Jun 08, 2012 6:34 am, edited 1 time in total.