micheal1230 Posted May 18, 2012 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)
TAPL Posted May 18, 2012 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)
micheal1230 Posted May 18, 2012 Author 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
Axel Posted May 18, 2012 Posted May 18, 2012 The error is not from the script. You must add to the sql the globalsupplies is settings.
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