Error: http://gyazo.com/035286dcd63640bec4a5eb10b7903184
He is a link to my code: http://pastebin.com/TKpi0b1i
local tankInfo = con[2].getTankInfo()
local contents = tankInfo[1].contents
local amount = contents.amount
samount = tostring(amount)
scap = "256000"
if samount == nil then
samount = "0"
end
Change this to:
local tankInfo = con[2].getTankInfo()
local contents = tankInfo[1].contents
local amount = 0
if contents then
amount = contents.amount
end
samount = tostring(amount)
if samount == nil then
samount = "0"
end
local tankInfo = con[2].getTankInfo()
local contents = tankInfo[1].contents
local amount = 0
if contents then
amount = contents.amount
else
amount = "0"
end
Well that fixed it but now i have this error: http://gyazo.com/bc1...415dfd4411df0a4
Well that fixed it but now i have this error: http://gyazo.com/bc1...415dfd4411df0a4
function fluidDisplay()
local tankInfo = con[2].getTankInfo()
local contents = tankInfo[1].contents
local name = contents.rawName --# Check if 'contents' is nil BEFORE this
local maxF = "256000"
addText(11,57,name,0xFF0000,1)
end
Err… What?With you new line 25 being?
Err… What?With you new line 25 being?
local maxF = "256000"
That can't throw any errors…Line 25 on his pastebin:That can't throw any errors…local maxF = "256000"
Can you post the updated code?Well that fixed it but now i have this error: http://gyazo.com/bc1...415dfd4411df0a4