Why does "GetNWInt" sometimes returns a string?
Shouldn't it return always an Int? I could just:
[CODE]
tonumber(ply:GetNWInt("Example"))
[/CODE]
I really don't get it. It doesn't happen all the times I think, why does it happen sometimes tho?
Did this happened to someone before?
It should never. Make sure no addons are overriding the function.
[QUOTE=code_gs;52463451]It should never. Make sure no addons are overriding the function.[/QUOTE]
No addons are overriding the function.
Any more ideias?
EDIT: The value is always right tho... The type changes from int to string sometimes. So f****** weird rly
EDIT2: I forgot to mention, i'm always doing something like this:
[CODE]
local Example = ply:GetNWInt("Example")
[/CODE]
So what happens is the Example var changes to string and not really the "ply:GetNWInt("Example")" it self
Some shitty code/addon (could be yours) does SetNWInt("Example", string)
[QUOTE=Robotboy655;52463625]Some shitty code/addon (could be yours) does SetNWInt("Example", string)[/QUOTE]
Well I'll have a better look at it tomorrow then, and I'll update you guys.
Thanks for the help!
EDIT: Ok It was actually pretty easy to find out where the strings were coming from since it was the only possible reason I was seeing.
When I get values from sql.Query("SELECT....") they come as strings even tho they are INT's on the database, that's normal right?
Thanks In Advance.
Sorry, you need to Log In to post a reply to this thread.