# $single_stock_item !! generic function to be used to stock single purchase items in stores !! see # shop, specifically the household appliances section for an example of use !! ARGS 0 is the value identifying when the item is owned !! it is assumed that anything >= the value is acceptable, this allows for upgrades like regular tv to plasma !! ARGS 1 is the item description !! ARGS 2 is the price !! ARGS 3 is the variable name for the item !! ARGS 4 is the location to go back to !! This will check to see if the item is already owned dynamic "$RESULT = iif(<<$ARGS[3]>> >= <>, '', 'not owned')" if $RESULT = '': exit end $RESULT = '' + _ '<<$ARGS[1]>>' + _ 'costs <> rubles' + _ '' if money >= ARGS[2]: $RESULT += 'buy' end $RESULT += '' --- $single_stock_item ---------------------------------