Difference between revisions of "Get dwelling"
Jump to navigation
Jump to search
imported>StDoodle m |
imported>Eliteofdelete |
||
Line 15: | Line 15: | ||
function_description=Returns the item corresponding with your dwelling (the item used to get the dwelling). Note that if you have no dwelling, this function will return $item[big rock].| | function_description=Returns the item corresponding with your dwelling (the item used to get the dwelling). Note that if you have no dwelling, this function will return $item[big rock].| | ||
− | + | code1={{CodeSample| | |
+ | title=Code Samples| | ||
+ | description=Informs you what your current dwelling is.| | ||
+ | code= | ||
+ | <syntaxhighlight> | ||
+ | item house = get_dwelling(); | ||
+ | if (house == $item[big rock]) | ||
+ | print("You currently do not have a house, you should use the Newbiesport™ Tent.", "red"); | ||
+ | else print("You are currently using "+house+" for housing.","blue"); | ||
+ | </syntaxhighlight>| | ||
+ | |||
+ | }}| | ||
see_also={{SeeAlso|get_campground|map_to_file}}| | see_also={{SeeAlso|get_campground|map_to_file}}| | ||
}} | }} | ||
[[Category:Item Management]] | [[Category:Item Management]] |
Latest revision as of 03:34, 14 January 2015
Function Syntax
item get_dwelling()
Returns the item corresponding with your dwelling (the item used to get the dwelling). Note that if you have no dwelling, this function will return $item[big rock].
Code Samples
Informs you what your current dwelling is.
item house = get_dwelling();
if (house == $item[big rock])
print("You currently do not have a house, you should use the Newbiesport™ Tent.", "red");
else print("You are currently using "+house+" for housing.","blue");