Setting variable with NW string doesn't want to work.

I have been trying to instantiate a variable assigning it the value of a NWString and just a simple “0” on the end.

[LUA]local quickie = ply:GetNWString(“TempCID”) … “0”[/LUA]

Problem? quickie always ends up having the value of just the 0, however i am almost positive the networked variable has a value considering i use it in a previous function…

Also if anyone knows tmysql, why is it that it works so oddly it makes me confuzzled sometimes. I set TempCID inside of the callback function, and it works for the next query I use it in, however after that the problem above tends to ocurr.

your TempCID Nw var is never set. Make sure its set first

It is set, I already said that :stuck_out_tongue:

Well. Its not in your case. Its set to “” or nil

Well also your trying to concate it but lua doesn’t know it’s a string. Put tostring and in between the brakets the get nw part

I disagree, All that code is propper. Its something wrong with the code that sets the NW var i think

no, because the NW var is used in a previous tmysql query and it works perfectly.

tried ingame debuging?

do like lua_run print(Entity(1):GetNWString(“TempCID”))

Stuff like that

Are you sure you were using NWString in your other functions and not NWInt or the likes?

Positive im using NWString, and I tried outputting the NWString, and comes up with nothing… which is pretty weird consideirng It does work in one of the original functions. >.>