- Joined
- Aug 7, 2013
- Messages
- 1,338
Edit: It's not a
Hi,
I have this code which creates a
Note that everywhere else I've done the same code and haven't had an issue.
If it helps, the very first wrapper made gets assigned id #252, which apparently isn't an allocated struct (considering all its fields are null / default).
However, afterwards the id bounces between #71 and #73, presumably because the struct is getting allocated / deallocated successfully.
dialog
bug, but rather my misunderstanding of boolexpr
. This is solved!Hi,
I have this code which creates a
dialog
wrapper. For whatever reason, it doesn't create a valid wrapper in the very first time the function is called. BUT, it works perfectly well everytime afterwards. So in the body I literally created the wrapper the same way twice, and the second time it's created it starts working. Why is this?
JASS:
set newDialog = farm.monstersToDialog(SWAPOUT_MSG, Condition(function swapoutMain), 3)
call newDialog.setBackdialog(linkedDialog.backDialog)
call print("showing the NEW DIALOG")
set g = newDialog.get(FIRST_DIALOG)
call g.show(pid, true)
call print("showed the new dialog #: " + I2S(g))
call newDialog.flush()
set newDialog = farm.monstersToDialog(SWAPOUT_MSG, Condition(function swapoutMain), 3)
call newDialog.setBackdialog(linkedDialog.backDialog)
call print("showing the NEW DIALOG")
set g = newDialog.get(FIRST_DIALOG)
call g.show(pid, true)
call print("showed the new dialog #: " + I2S(g))
Note that everywhere else I've done the same code and haven't had an issue.
If it helps, the very first wrapper made gets assigned id #252, which apparently isn't an allocated struct (considering all its fields are null / default).
However, afterwards the id bounces between #71 and #73, presumably because the struct is getting allocated / deallocated successfully.
Last edited: