WebAudio icon indicating copy to clipboard operation
WebAudio copied to clipboard

pasting a webaudio chip with advdupe2 causes a lua error

Open Andrew-Eathan opened this issue 3 years ago • 1 comments

sv: Expression 2 (dad snoring): lua/entities/gmod_wire_expression2/core/custom/webaudio.lua:837: attempt to call method 'IsValid' (a nil value)

  • the chip, sloppily made for a dupe that makes a ragdoll shake on a bed whenever it snores https://pastebin.com/VxSJ3KyE

Andrew-Eathan avatar Jun 17 '22 18:06 Andrew-Eathan

This is another issue I currently have no idea how to fix as it has to do with the internals of wire/e2, maybe it isn't as bad as #55 but still will take a good while to figure out why this is happening.

Right now the code is being called with A having all of the fields and whatever of a WebAudio object, but is missing the metatable, so the IsValid function doesn't exist. I could replace that method call with just IsValid (and probably will cause I'm lazy) but it'd be good to look into why this is happening at all since maybe this could be linked to #55 as well.

The only way for that to happen though is if it literally serialized the webaudio and stored it for use across the dupe, which is dumb and I don't think E2 should/does do that. I also don't remember if advdupe triggers first() (I swear duped() was only for regular duplicator, but w/e)

vurvdev avatar Jun 18 '22 01:06 vurvdev