micheal1230 Posted May 18, 2012 Share Posted May 18, 2012 I Get That Error Script: function resStart() local result = mysql:query_fetch_assoc("SELECT value FROM settings WHERE name='globalsupplies' LIMIT 1") globalSupplies = tonumber(result["value"]) end addEventHandler("onResourceStart", getResourceRootElement(), resStart) Link to comment
TAPL Posted May 18, 2012 Share Posted May 18, 2012 try function resStart() local result = mysql:query_fetch_assoc("SELECT value FROM settings WHERE name='globalsupplies' LIMIT 1") globalSupplies = tonumber(result[1]["value"]) end addEventHandler("onResourceStart",resourceRoot, resStart) Link to comment
micheal1230 Posted May 18, 2012 Author Share Posted May 18, 2012 try function resStart() local result = mysql:query_fetch_assoc("SELECT value FROM settings WHERE name='globalsupplies' LIMIT 1") globalSupplies = tonumber(result[1]["value"]) end addEventHandler("onResourceStart",resourceRoot, resStart) Nope Link to comment
Axel Posted May 18, 2012 Share Posted May 18, 2012 The error is not from the script. You must add to the sql the globalsupplies is settings. 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