DamageInfo returning a table?

I have this error on my toybox swep (Puntcannon) and i don’t know how to fix this.
How the heck **[G.DamageInfo

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=G.DamageInfo)** is supposed to be a table on the server/client?
The wiki says it’s an object,but sometimes this error pops in for some users.
[lua]

  • [!toybox_1870_8:753] attempt to call global ‘DamageInfo’ (a table value)
  • [!toybox_1870_8:708] attempt to call global ‘DamageInfo’ (a table value)
    [/lua]
    I guess there are two possible answers to this:
    1)There are some circumstances where DamageInfo() is a table;
    2)Only GMac users have this error;
    Can you help me?

A lot of people are having this problem, so it’s most likely due to a poorly written addon. It would be nice if you could find out exactly which one, and try to contact its author about it, I’ve seen a huge bunch of people having this problem and none of them bothered figuring out which addon caused it.

I’ve been getting this error reported before gmac was released, and also people apparently not having the spawn function run on the entity they spawned.

That would be really hard to accomplish,like you said,peoples do not like to collaborate in fixing something,they just moan about it and nothing else.
Allright,i’ll add some kind of debug inside my Puntcannon swep,a vgui message or shit like that,to inform the user that they got this error.
Something like:

“--------------
WARNING,
this weapon has encountered an error within your garrysmod,
it looks like there are some addons that conflits with a vital garrysmod function.
Please post your addons list in this topic
http://www.facepunch.com/showthread.php?p=25090982
-------------------”
Let’s see what will be the result of this.

You could also do something hacky, like checking if its a table, then make it error with a debug dump

[editline]08:49PM[/editline]

I actually have a feeling that its a poorly coded toybox entity… EDIT: I meant another entity, not this

Added the DamageInfo function check.

I didnt mean like that, i meant another entity is crappy and override the function

Probably not Toybox related, this error has been around since way before Toybox existed.

Oh…sorry,i feel bad now for what i wrote. :smith:

Anway,why a crappy entity would override that function,this might be a problem with a major addon,i don’t know,wire?
Also,will a ErroNoHalt print whatever i tell it to the Toybox error log?

the non-halting missing model errors did, so probably yes.

you could make it somewhat dump all addons that the client have and look for connections, or something

I read in another thread that Spidermod creates a global table named DamageInfo. Why the hell do people like to assume that wire breaks everything else?

Because it’s cool to point to wire when hundreds of peoples experience the same error. :smug:
It’s the spidermod that causes that error?
Gotta check it’s code.