Get dwelling: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle Created page with '{{ #vardefine:name|get_dwelling}}{{ #vardefine:return_type|item}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate}}| re…' |
imported>Eliteofdelete No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 13: | Line 13: | ||
}}| | }}| | ||
function_description=Returns the item corresponding with your dwelling (the item used to get the dwelling).| | 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");