See attempt at discussion here.
Wiki documentation here.
put_display returns TRUE when asked to move something into the display case that is not present in inventory.
The preferred solution, IMO, would be for put_display to return TRUE if, and only if, the requested number of the requested items really were moved from inventory to the display case. An acceptable solution would be to update the wiki to indicate TRUE means the function calls succeeded and does not necessarily mean that the transfer was a success.
Similar behavior may exist with other put_ and various take_ functions.
This script (also attached)
generates this output:
Thanks.
Wiki documentation here.
put_display returns TRUE when asked to move something into the display case that is not present in inventory.
The preferred solution, IMO, would be for put_display to return TRUE if, and only if, the requested number of the requested items really were moved from inventory to the display case. An acceptable solution would be to update the wiki to indicate TRUE means the function calls succeeded and does not necessarily mean that the transfer was a success.
Similar behavior may exist with other put_ and various take_ functions.
This script (also attached)
Code:
boolean success;
item it = $item[Bricko egg];
int have = item_amount(it);
print("Have "+have+" of "+it+" in bag");
// Put something I don't have in the DC
success = put_display(1, it);
have = display_amount(it);
print("Success "+success+" and have "+have+" of "+it+" in DC");
(Attached script does a little more but...)Have 0 of BRICKO egg in bag
Updating display case...
Placing items in display case...
Success true and have 1 of BRICKO egg in DC
Thanks.