Snoozy Posted May 28, 2011 Share Posted May 28, 2011 getElementData(getLocalPlayer(),"CharacterCigarette") Elements like that is currently when I try and use them with a if statement acting as a string even when the loading is clearly integers. I'm setting their values with values from mysql and the mysql columns is integers but when I'm ingame I get errors where it states that they are all of them strings? So I have to set tonumber() on like every single one. Link to comment
qaisjp Posted May 28, 2011 Share Posted May 28, 2011 instead of setElementData(getLocalPlayer(),"CharacterCigarette", "2", true) do setElementData(getLocalPlayer(),"CharacterCigarette", 2, true) Link to comment
Snoozy Posted May 28, 2011 Author Share Posted May 28, 2011 Well I'm not really the one doing that then, cause as told it's stuff gotten from mysql that outputs strings even tho in mysql they are integers so yea idk Link to comment
Feche1320 Posted May 28, 2011 Share Posted May 28, 2011 Then use tonumber(the string) Link to comment
qaisjp Posted May 28, 2011 Share Posted May 28, 2011 tonumber(..theSQL_QUERY_GOES_HERE..) 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