freudo Posted May 24, 2020 Share Posted May 24, 2020 (edited) result is "no data" I can't find any errors. I did not share all the codes. It works well. login.dataJson = "[{ \"money\": 0, \"point\": 0, \"wins\" }]" if ( type ( result ) == "table" and #result > 0 or not result ) then for i,v in ipairs( result ) do if v.username == tostring(username) then outputChatBox("account name = "..tostring(v.username)) local json = v.data or {} if json == false or json == nil then outputChatBox("no json") return false end local data = fromJSON(json) if data == nil then outputChatBox("no data") return false end outputChatBox(tostring(v.money)) -- nil end end end Edited May 24, 2020 by barikat Link to comment
N3xT Posted May 24, 2020 Share Posted May 24, 2020 looks like the JSON string is invalid Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now