json_encode error in client file
Closed this issue · 2 comments
Dimmies commented
Having issues with json_encode in client file.
ExecuteWebJS(web, "initPhone({ currentUserPhone: '"..phoneNumber.."', money: "..money..", contacts: "..json_encode(contacts)..", messages: "..json_encode(messages).."});")
The above line for example will spit an error :
[string "phone/client.lua"]:28: attempt to call a nil value (global 'json_encode')
If I import json.lua into the client files in package.json, I get a new error
[string "phone/json.lua"]:68: attempt to call a nil value (global 'rawget')
Dimmies commented
Was using wrong version on json.lua - Fixed!