Garry's Mod

Garry's Mod

[E2] DamageCore
Sir Papate  [开发者] 2014 年 1 月 16 日 下午 8:04
Bug reports
If you experience any lua error, please write down the error and your code in the comments.
< >
正在显示第 1 - 15 条,共 21 条留言
PurityDemon 2016 年 7 月 19 日 下午 7: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  [开发者] 2016 年 7 月 20 日 上午 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 2017 年 1 月 4 日 下午 1:14 
I'm getting this error when using the search function in E2 helper.
Skyrox 2017 年 1 月 29 日 上午 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 2017 年 7 月 6 日 下午 8: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 2017 年 7 月 27 日 下午 11: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 2017 年 9 月 23 日 下午 3:46 
引用自 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 2018 年 6 月 6 日 上午 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 2018 年 12 月 7 日 上午 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 2018 年 12 月 7 日 下午 12:55 
what where you trying to do?
Sanders 2018 年 12 月 7 日 下午 12:56 
and it looks like you are trying to have it go to nothing and that will make it mess up.
foreskin cottage cheese 2020 年 8 月 9 日 下午 1:05 
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 2020 年 9 月 16 日 上午 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 2021 年 10 月 9 日 上午 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?
最后由 Rezerkity 编辑于; 2021 年 10 月 9 日 上午 6:16
Sanders 2021 年 10 月 9 日 上午 10:52 
引用自 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)
< >
正在显示第 1 - 15 条,共 21 条留言
每页显示数: 1530 50