Umsg string misses first few characters?

Hey everyone!
I have a umsg like this:



print("should be " .. name)
umsg.Start("informationToClient")
umsg.String(name)
umsg.Long(wallet)
umsg.End()


Which works fine… Until it reaches the client… The string on the umsg gets split half way. For example, my RP name (Jeffry Jizz) gets sent through the umsg and when the client recieves it it comes out as:


ry Jizz

Same goes if I try to do my Steam ID (STEAM_0:1:37701061) which comes out as:
M_0:1:37701061

Why is it splitting them for? Whats going on? The variable wallet (afaik) is ok though…

Use net library instead? Also, post your receiver code.



local function recInfo(data)
wallet = data:ReadLong()
player = data:ReadString()
print(data:ReadString())
drawMenu()
end
usermessage.Hook("informationToClient", recInfo)






Stop globalizing variables like that, and you have to call the read functions in the order they were sent.

Aha! Thank you.