GOD Esteve
New Member
- Joined
- May 18, 2011
- Messages
- 87
- Reaction score
- 1
I have this function to get a value from my DB
Using TFS 1.0
Thats is the error when i execute this function at my server
attempt to index global `resultado` <a nill value> stack traceback:
The print(resultado[1]) it`s to check the function works but got this erro above.
Please help to solve.
Thank You and Merry Christmas
Using TFS 1.0
Code:
function GetInfo()
for k, i in ipairs({'started','guild','breaker','time'}) do
local tmp = db.storeQuery("SELECT ".. i .." FROM `tmpwoe` WHERE `id` = '1';")
resultado[k] = result.getDataInt(tmp, i)
print(resultado[1])
result.free(tmp)
end
end
Thats is the error when i execute this function at my server
attempt to index global `resultado` <a nill value> stack traceback:
The print(resultado[1]) it`s to check the function works but got this erro above.
Please help to solve.
Thank You and Merry Christmas