Skip to main content

fetchFarm

exports["RiP-Weed"]:fetchFarm() 

This function fetches the current farm's data

Returned Table

NameTypeExplenation
ownedInteger0 = not owned; 1 = owner; 2 = owned by other player
balanceIntegerFarm's money
total_salesIntegerFarm's all-time money
plantsArrayFarm's active plants
storageArrayFarm's storage
crafterArrayFarm's crafting queue
upgradesArrayFarm's upgrades
statsArrayFarm's harvest stats
seed_statsArraySeed top 3 charts
  • false on error

Example

local farmData = exports["RiP-Weed"]:fetchFarm() 
if farmData then
print(json.encode(farmData))
else
print("player is not inside a farm")
end