Editing Module:Sandbox/User:The Gaffer/Modules/Infobox Recipe
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
-- get the buy price from the query result |
-- get the buy price from the query result |
||
local function getCost(queryResult) |
local function getCost(queryResult) |
||
if type(queryResult) == "table" and queryResult[1 |
if type(queryResult) == "table" and queryResult[1] then |
||
return tonumber(queryResult[1 |
return tonumber(queryResult[1]) or 0 |
||
end |
end |
||
return 0 |
return 0 |