Title LUA: have_item() should be logical, not numeric
Priority important Status rejected
Assigned To Keywords
Linked issues Watchers

Submitted on 2011-11-21 20h59 by matthiaskrgr, last changed by salimiles.

File name Uploaded Type Edit Remove
patch.patch matthiaskrgr, 2011-11-21.20:59:48 text/x-diff
Author: matthiaskrgr Date: 2011-11-21   20h59
The attached patch will always return "works" (true) for the first   EveryTime
LuaCode check, regardless of if I have the "!" item or not.

I noticed this bug while checking for "The Super Exterminator!!!" which didn't
work properly.


Attached patch.patch.
Author: salimiles Date: 2011-11-21   23h39
In Lua the number 0 does not equal nil or false. See 

So not a bug.
Author: matthiaskrgr Date: 2011-11-22   13h24
Indeed, thanks for pointing out!
Author: salimiles Date: 2011-11-22   19h29
Well since it affects a number of dialogs, a version of this should included in

So renaming/reactivating, with a possible patch:

See you guys after Thanksgiving!
Date User Action Args
2011-11-22 19:29:52salimilessetpriority: bug -> important
messages: + msg2067
title: LUA: item names containing "!" always return true on check if we have it? -> LUA: have_item() should be logical, not numeric
2011-11-22 13:24:06matthiaskrgrsetmessages: + msg2064
2011-11-21 23:39:47salimilessetstatus: open -> rejected
messages: + msg2062
2011-11-21 20:59:49matthiaskrgrcreate