Vurv78 / WebAudio

A safe, efficient and powerful replacement for Streamcore that adds playing & manipulating URL streams through IGmodAudioChannel/BASS
https://steamcommunity.com/sharedfiles/filedetails/?id=2466875474
MIT License
18 stars 3 forks source link

pasting a webaudio chip with advdupe2 causes a lua error #56

Open Andrew-Eathan opened 2 years ago

Andrew-Eathan commented 2 years ago

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

Vurv78 commented 2 years ago

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)