• garrysmod\lua\autorun\server\digitalcamo.lua:41: attempt to compare two userdata values
    16 replies, posted
I'm trying to compare the player's velocity with a velocity it should/not be. [code] this is the GetMySpeed function: function _R.Player:GetMySpeed() if self:GetVelocity() == Vector(0, 0, 0) then return true else return false end end this is the part that is bitchy: if ply:GetMySpeed() then if CurTime() > ply.AppTime then math.Approach(ply.CurrentAlpha, 60, 2) ply.AppTime = CurTime() + 0.1 end else -- LINE 41 if CurTime() > ply.AppTime then math.Approach(ply.CurrentAlpha, 255, (curforwardvel / 100)) ply.AppTime = CurTime() + 0.08 end end [/code] Help would be appreciated. Thanks in advance.
[QUOTE]Help would be appreciated. [/QUOTE] the errors would be appreciated.
garrysmod\lua\autorun\server\digitalcamo.lua:41: attempt to compare two userdata values if you havn't noticed already
For some reason autorun scripts in garrysmod randomly wont reload, retarting GMod fixes it not reloading your script, becuse a error at a else is retarded
[QUOTE=Tobba;22550332]For some reason autorun scripts in garrysmod randomly wont reload, retarting GMod fixes it not reloading your script, becuse a error at a else is retarded[/QUOTE] I restarted it the map a lot but it still seemed to give me that error. I hate vectors sometimes. I'm gonna try a different approach now, instead of comparing vectors, I'll compare vectors' length. garrysmod\lua\includes\extensions\math.lua:201: bad argument #1 to 'abs' (number expected, got Vector) Oh boy.
"garrysmod/" shouldn't be in your error path. Warez? :yarr:
[QUOTE=|FlapJack|;22550950]"garrysmod/" shouldn't be in your error path. Warez? :yarr:[/QUOTE] What? You want the full path? Okay, here it is: H:\srcds\orangebox\garrysmod\lua\autorun\server\digitalcamo.lua P.S. I'm testing on my dedicated server, that's why it's garrysmod/ P.P.S I just tried simply setting my alpha, and it didn't work, what the shit? Is it bugged since the latest update? Because last time I tried (a year ago) setting alpha on a player, it worked just fine.
[QUOTE=LEETNOOB;22551073]What? You want the full path? okay, here it is: H:\srcds\orangebox\garrysmod\lua\autorun\server\digitalcamo.lua P.S. I'm testing on my dedicated server, that's why it's garrysmod/ P.P.S I just tried simply setting my alpha, and it didn't work, what the shit? Is it bugged since the latest update?[/QUOTE] Funny thing is errors don't show like that on dedis either. Why do I know? Because of the error log in my dedi shows otherwise. [code] [ 06/07/10 02:09:02 ] addons\ranks\lua\rank\sh_objects.lua:51: attempt to perform arithmetic on field 'cash' (a nil value) [/code]
[QUOTE=|FlapJack|;22551097]P.S. I'm testing on my dedicated server, that's why it's garrysmod/ Funny thing is errors don't show like that on dedis either. Why do I know? Because of the error log in my dedi shows otherwise. [code] [ 06/07/10 02:09:02 ] addons\ranks\lua\rank\sh_objects.lua:51: attempt to perform arithmetic on field 'cash' (a nil value) [/code][/QUOTE] That's because it's not in addon form and it's lying in lua/autorun/server. Now stop being a moralfag please.
[QUOTE=LEETNOOB;22551102]That's because it's not in addon form and it's lying in lua/autorun/server. Now stop being a moralfag please.[/QUOTE] Get out of this forum. You pretend to know what you're talking about, when you really don't. Take your warez back to wherever it came from. [code] [ 05/29/10 14:01:33 ] lua\includes\util.lua:35: bad argument #1 to 'pairs' (table expected, got string)[/code]
[QUOTE=|FlapJack|;22551116]Get out of this forum. You pretend to know what you're talking about, when you really don't. Take your warez back to wherever it came from.[/QUOTE] Okay, WHAT. It's you the one who don't seem to know what you're talking about. You don't even have clues that I use a pirated GMod. Here, have my Steam profile: [url]http://steamcommunity.com/id/ifenerv[/url] OH and you if you "REALLY" want to see if I'm a pirate, go ahead, join my server: 87.239.112.10:27015
[QUOTE=LEETNOOB;22551129]It's you the one who don't seem to know what you're talking about.[/QUOTE] Ahahaha. Made my day. [img_thumb]http://www.facepunch.com/fp/rating/emoticon_tongue.png[/img_thumb]
[QUOTE=|FlapJack|;22551194]Ahahaha. Made my day. [img_thumb]http://www.facepunch.com/fp/rating/emoticon_tongue.png[/img_thumb][/QUOTE] You're either an idiot, or a really bad troll. So, you joining my server anytime soon?
[QUOTE=LEETNOOB;22550692]garrysmod\lua\includes\extensions\math.lua:201: bad argument #1 to 'abs' (number expected, got Vector)[/QUOTE] You're doing it wrong, it's self:GetVelocity():Length() to get the length of the vector. How about you ladies actually help instead of putting people down over the tiniest details?
[QUOTE=_Kilburn;22551253]You're doing it wrong, it's self:GetVelocity():Length() to get the length of the vector. [/QUOTE] Still, it doesn't set alpha at all, I tried that by adding a server-side concommand that sets the players' alpha to 150, but it didn't work at all (no errors, the player still stays transparent) [code] concommand.Add("setmyalpha", function(ply) if not ply:IsAdmin() then ply:ChatPrint("Admin-Only.") end ply:SetColor(255, 255, 255, 150) end) [/code] P.S. I just noticed, when I set my alpha to 150, the shadow was really transparent (but not the player), but when I set it back to 255, the shadow was normal again, another Garry's Mod update bug?
It's always been like that. You won't see yourself transparent, but other players will. Try changing the player's rendermode using [b][url=http://wiki.garrysmod.com/?title=Entity.SetRenderMode]Entity.SetRenderMode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. [url]http://wiki.garrysmod.com/?title=Render_mode[/url] If I remember correctly, RENDERMODE_TRANSCOLOR should do nicely.
[QUOTE=_Kilburn;22551537]It's always been like that. You won't see yourself transparent, but other players will. Try changing the player's rendermode using [b][url=http://wiki.garrysmod.com/?title=Entity.SetRenderMode]Entity.SetRenderMode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. [url]http://wiki.garrysmod.com/?title=Render_mode[/url] If I remember correctly, RENDERMODE_TRANSCOLOR should do nicely.[/QUOTE] Nope, still no luck, I tried RENDERMODE_TRANSCOLOR and RENDERMODE_TRANSALPHA but still no luck. I'm definitely sure it's a GMod bug. Also, if you can, add me to your friends list on Steam, I've sent you an invite. P.S. I'm testing this with my friend and when I turned it on, I asked him to tell me whether or not am I partially invisible, he said that only my shadow was.
Sorry, you need to Log In to post a reply to this thread.