Jump to content

Elements supposed to be integers but acts as strings?


Snoozy

Recommended Posts

Posted
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.

  • MTA Team
Posted

instead of

setElementData(getLocalPlayer(),"CharacterCigarette", "2", true) 

do

setElementData(getLocalPlayer(),"CharacterCigarette", 2, true) 

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...