Is tradeable: Difference between revisions
Jump to navigation
Jump to search
imported>Heeheehee m Added code example. |
imported>Bale mNo edit summary |
||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 34: | Line 33: | ||
see_also={{SeeAlso|is_displayable|is_giftable}}| | see_also={{SeeAlso|is_displayable|is_giftable}}| | ||
}} | }} | ||
[[Category:Item Management]] |
Revision as of 21:48, 21 May 2010
Function Syntax
boolean is_tradeable(item check_me )
- check_me is an item to test
This function checks to see if the item check_me can be traded, returning true if it can and false otherwise.
Code Samples
The following function dumps your entire inventory into your mall store.
void inv_dump() {
if(have_shop()) {
foreach i in get_inventory()
if(is_tradeable(i)) put_shop(0, item_amount(i), i);
}
}