damii211
09-09-2015, 08:01 PM
Bug ReportOperating System:
Windows 7 x86 Short Description:
Self.DropItem return value Behaviors: Loss of or impaired functionality
Indepth Description:
Function Self.DropItem should return true or false as comment above this function says:
-- @return boolean true or false
However, this function never returns false and it returns true only if we specify an amount of items to drop and this amount is lower than items count. Otherwise it doesn't return anything at all.
Things to do to reproduce this behaviour:
I have a backpack with 4 gp and nothing else inside it. I execute this script:
print(type(Self.DropItem(Self.Position().x + 1, Self.Position().y, Self.Position().z, 3031, 1)))
It drops 1 gold coin and prints "boolean". Then I execute this script:
print(type(Self.DropItem(Self.Position().x + 1, Self.Position().y, Self.Position().z, 3031)))
It drops all the gold coins I have and then an error occurs because "type" expects a value and function doesn't return anything
Forgive me if I misunderstood the function's code and it works as expected
Windows 7 x86 Short Description:
Self.DropItem return value Behaviors: Loss of or impaired functionality
Indepth Description:
Function Self.DropItem should return true or false as comment above this function says:
-- @return boolean true or false
However, this function never returns false and it returns true only if we specify an amount of items to drop and this amount is lower than items count. Otherwise it doesn't return anything at all.
Things to do to reproduce this behaviour:
I have a backpack with 4 gp and nothing else inside it. I execute this script:
print(type(Self.DropItem(Self.Position().x + 1, Self.Position().y, Self.Position().z, 3031, 1)))
It drops 1 gold coin and prints "boolean". Then I execute this script:
print(type(Self.DropItem(Self.Position().x + 1, Self.Position().y, Self.Position().z, 3031)))
It drops all the gold coins I have and then an error occurs because "type" expects a value and function doesn't return anything
Forgive me if I misunderstood the function's code and it works as expected