Page 1 of 1

Strange behaviour of DebugPrompt()

Posted: Wed Apr 05, 2023 7:15 pm
by Allanon
Hello Andreas,
under HW10, on Windows 10, the command DebugPrompt() is skipped but a value is assigned to its variable, here is an example:

Code: Select all

@DISPLAY { Hidden = True }
@OPTIONS { EnableDebug = True, ConsoleMode = True }

DebugPrint("HELLO!") ; it works so OPTIONS is doing its job
@WARNING "warning" ; This works too
a=DebugPrompt("Debug prompt ?")      ; <-- this is skipped!
b=DebugPrompt("Debug prompt ?")      ; <-- this is skipped!

DebugPrint("A:", a, b)
ConsolePrompt("Console prompt ?")  ; <-- this work
The a & b variables gets some messed up strings, but they should be empty if DebugPrompt() has been really skipped.
ConsoleMode is ininfluent, DebugPrompt() is skipped anyway.
I've the same behaviour both on script & compiled app.

Re: Strange behaviour of DebugPrompt()

Posted: Thu Apr 13, 2023 3:43 pm
by airsoftsoftwair
Yep, definitely a bug. Fixed now. Workaround: Just use ConsolePrompt().

Code: Select all

- Fix: DebugPrompt() was broken

Re: Strange behaviour of DebugPrompt()

Posted: Sat Apr 15, 2023 5:24 pm
by Allanon
Great, thank you!

Yes, I used

Code: Select all

DebugPrompt = ConsolePrompt
at the beginning of my scripts, I'm too lazy to change them all :D