Garry's Mod

Garry's Mod

[E2] DamageCore
Sir Papate  [udvikler] 16. jan. 2014 kl. 20:04
Bug reports
If you experience any lua error, please write down the error and your code in the comments.
< >
Viser 1-15 af 21 kommentarer
PurityDemon 19. juli 2016 kl. 19:17 
I've found an error, but it may be part of the current wiremod update because the lua error is coming from a wiremod base file.
Code causing error:
@name Test
@persist Dmg:damage
runOnTick( 1 )
if( first() ) {
Dmg:setDamageType( 0 )
}
lua/entities/gmod_wire_expression2/core/e2lib.lua:112: Type ID 'd' not found
Do you think this is part of wiremod? or perhaps I am doing something incorrectly. Thanks
Sir Papate  [udvikler] 20. juli 2016 kl. 9:47 
Ok, the error is not from the wire or from the damagecore. You just used the wrong function, setDamageType work on an effect object (xef). The set the damage type on a damage object you must use dmg:setType(n). And you need to initialize your value whit Dmg = damage()

@name Test @persist Dmg:damage if(first()) { runOnTick(1) Dmg = damage() Dmg:setType(0) }
yackson 4. jan. 2017 kl. 13:14 
I'm getting this error when using the search function in E2 helper.
Skyrox 29. jan. 2017 kl. 6:24 
It seems i can not get dmgClk() to respond, I know some lua and removed all the stuff that does damage to things, i only wanted the damage detection part, either i removed something i shouldn't have (though it gives no errors), but for some reason dmgClk() does not seem to work.
Whitewolf 6. juli 2017 kl. 20:50 
On a multiplayer server I'm on, I get "sv: Expression 2 (generic): entities/gmod_wire_expression2/core/custom/damagecore.lua:323: bad argument #1 to 'pairs' (table expected, got nil)"


Here's my code:


@name
@inputs
@outputs
@persist
@trigger

runOnDmg(1,owner())
Attacker = dmgAttacker()
if(!(Attacker == owner())){
Attacker:dmgApplyDamage(Attacker:health())
owner():plySetHealth(10000)
}
Sanders 27. juli 2017 kl. 23:44 
my e2 uses this core and ever single time i try to use it on a player i get this error: sv: Expression 2 (LOCATOR_E2_COMPLETE_WITH_DISH_updatedmost_22A): entities/gmod_wire_expression2/core/custom/damagecore.lua:323: bad argument #1 to 'pairs' (table expected, got number)
Sanders 23. sep. 2017 kl. 15:46 
Oprindeligt skrevet af Whitewolf:
On a multiplayer server I'm on, I get "sv: Expression 2 (generic): entities/gmod_wire_expression2/core/custom/damagecore.lua:323: bad argument #1 to 'pairs' (table expected, got nil)"


Here's my code:


@name
@inputs
@outputs
@persist
@trigger

runOnDmg(1,owner())
Attacker = dmgAttacker()
if(!(Attacker == owner())){
Attacker:dmgApplyDamage(Attacker:health())
owner():plySetHealth(10000)
}


im getting the same exact error and i have found a line in the lua thats at that line


---line 323----
for k, v in pairs( ply2:CPPIGetFriends() ) do
if v == ply1 then
return true
end
end

return false
end

---end of line 323----

this is what it said
so its either that line i posted or the way the code was done
AbigailBuccaneer 6. juni 2018 kl. 9:27 
There was an error loading the custom/damagecore.lua extension. Please report this to its developer.
entities/gmod_wire_expression2/core/custom/damagecore.lua:95: malformed type ID 'dmg' - type IDs must be one character long, or three characters long starting with an x

I reported this on GitHub too, https://github.com/sirpapate/damagecore/issues/3 .
Mousastrophe 7. dec. 2018 kl. 1:40 
@name
@inputs
@outputs
@persist A:damage
@trigger
A:setDamage(1000)

There is no error in defining A as type "Damage", but when I use this variable "A" like line 6. It pops out this
"sv: Expression 2 (generic): entities/gmod_wire_expression2/core/custom/damagecore.lua:542: attempt to index local 'this' (a userdata value)"
and E2 just stops updating.
Sanders 7. dec. 2018 kl. 12:55 
what where you trying to do?
Sanders 7. dec. 2018 kl. 12:56 
and it looks like you are trying to have it go to nothing and that will make it mess up.
getting sv: Expression 2 (script error test): entities/gmod_wire_expression2/core/custom/damagecore.lua:323: bad argument #1 to 'pairs' (table expected, got number)
when targetting a player
paul_rose 16. sep. 2020 kl. 7:15 
i found and error, me and my friends use runOnDmg()/ trackDamage() a lot for a custom health system for some of our builds and i have found that if u take damage while using dmgApplyDmg()
,takeDamage() or turretShoot() from AntCore we get presented with this error

sv: Expression 2 (Discord): entities/gmod_wire_expression2/core/hologram.lua:517: attempt to perform arithmetic on local 'index' (a nil value)

or we will receive 4-8 tick quota messages instantly

i have tried disabling AntCore and the error still happens, do u know what might be causing it and is there a way to fix it because it happens a lot and we often cant use your builds since they just end up getting the script error
Rezerkity 9. okt. 2021 kl. 6:15 
Seems to not work with Falco's Prop Protection installed, even if all options are disabled.

When I try to use E:takeDamage(DMG) on a player who has not put me on their buddy list, I get the error:

sv: Expression 2 (Worm): entities/gmod_wire_expression2/core/custom/damagecore.lua:323: bad argument #1 to 'pairs' (table expected, got number)

However, the old E:dmgApplyDamage(N) works just fine.

I have tried all of Falco's Prop Protection cvars in addition. 4 works as expected, but 2 and 3 causes errors.

Unfortunately this means that there's no way to apply special damage types, damage from directions, or damage force either. I'm not asking for a fix, but is this an error on my side or an incompatibility for the addon itself?
Sidst redigeret af Rezerkity; 9. okt. 2021 kl. 6:16
Sanders 9. okt. 2021 kl. 10:52 
Oprindeligt skrevet af Rezerkity:
Seems to not work with Falco's Prop Protection installed, even if all options are disabled.

When I try to use E:takeDamage(DMG) on a player who has not put me on their buddy list, I get the error:

sv: Expression 2 (Worm): entities/gmod_wire_expression2/core/custom/damagecore.lua:323: bad argument #1 to 'pairs' (table expected, got number)

However, the old E:dmgApplyDamage(N) works just fine.

I have tried all of Falco's Prop Protection cvars in addition. 4 works as expected, but 2 and 3 causes errors.

Unfortunately this means that there's no way to apply special damage types, damage from directions, or damage force either. I'm not asking for a fix, but is this an error on my side or an incompatibility for the addon itself?



i do this with falcos installed it works for me


local Dmg = damage()
Dmg:setAttacker(E)
Dmg:setInflictor(E:weapon())
Dmg:setDamage(500)
Dmg:setType(67108864)
E:takeDamage(Dmg)
< >
Viser 1-15 af 21 kommentarer
Per side: 1530 50