Strange behaviour of DebugPrompt()

Report any Hollywood bugs here
Post Reply
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Strange behaviour of DebugPrompt()

Post 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.
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
airsoftsoftwair
Posts: 5833
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Strange behaviour of DebugPrompt()

Post by airsoftsoftwair »

Yep, definitely a bug. Fixed now. Workaround: Just use ConsolePrompt().

Code: Select all

- Fix: DebugPrompt() was broken
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Strange behaviour of DebugPrompt()

Post 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
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
Post Reply