General > Developers Corner
Utime - XGUI - Error- Help plz :/
Stickly Man!:
--- Quote from: chaos13125 on March 16, 2013, 10:49:56 AM ---Okay, I removed ply: and () from amt. Still got the same error.
--- End quote ---
My guess is that the value you're getting from the slider clientside is being returned as a string to begin with. Since you haven't posted your full code, I can't say for sure-- but you should try calling tonumber() where you get the value from the sldier, which then gets sent to the concommand. Alternately you can do it serverside, probably at this line of code like so:
--- Code: ---sql.Query( "UPDATE utime SET totaltime = " .. math.floor( tonumber( pl:amt() ) ) .. " WHERE player = " .. pl:UniqueID() .. ";" )
--- End code ---
Bite That Apple:
Well because I completely stopped caring about "copyright" for my utime script I'm just going to post my new completely remade code. I only remade it for two reasons: First, for myself, Secondly to make it easier to share.
Xgui/Clientside/whatever xgui is because I can't determine it(shared maybe?):
--- Code: ---fixed
--- End code ---
Then sv_utime.lua script thing:
--- Code: ---fixed
--- End code ---
Oh wait, I can't forgot my error can I?:
So as you can see, everything works fine with xgui thingy, but it gets to serverside and just explodes..
I don't know of any way of ulx or let alone garry's mod being able to go to send client side information to server side, it just doesn't seem to exist. Also, if you suggest "datastream", I couldn't get that thing to work either... so here I am stuck completely with a whole new re-written code of my modded utime. If anyone has advice, I would really love that, because I've been stuck on this for weeks now.. please help.
<3
Bite That Apple:
This has been fixed. I'll have an officially release of this in a week. Thank you all.
JamminR:
And the root cause analysis was ...?
Navigation
[0] Message Index
[*] Previous page
Go to full version