wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
554 stars 332 forks source link

DHDD not output anything? #1091

Closed oninoni closed 8 years ago

oninoni commented 8 years ago

I wrote array in a dhdd and it shows to be of the size 2 but it's writing an empty array to the Memory Output? Am i doing something wrong? dhdd

bigdogmat commented 8 years ago

This is because the output points to self.Proxy while that itself is empty. You can still use the output, though you can't iterate through it which is how debugger shows it I believe.

EDIT: Actually this should work fine, the debugger runs through it with ipairs which would pick up those indexes

EDIT2: I'm really stupid... Make sure AllowWrite has an input of 1

TomyLobo commented 8 years ago

Who is passing around tables with metatables as wiremod arrays? That's bound to break stuff...

oninoni commented 8 years ago

I Want to access the DHDD with a wirelink so what do i have to do?

bigdogmat commented 8 years ago

If I'm thinking correctly just make sure AllowWrite has an input of 1 when you try to input something in through data.

oninoni commented 8 years ago

It was 1 and as you can see in the "Size" Parameter data has been stored i just dont know how to acces it via wirelink?

oninoni commented 8 years ago

No Idea?

bigdogmat commented 8 years ago

Ok so I was wrong about it should working, I was testing in Lua 5.3 where ipairs respects metatables. So the reason for it not showing on the debugger is solved.

Though when I tried to get a value from the array within E2 I got not result, as for why I have no idea. I'd attempt to look through the value handling within E2 but I'd have no idea where to start.

oninoni commented 8 years ago

So It's broken? Great...

TomyLobo commented 8 years ago

this is why you test stuff inside gmod

bigdogmat commented 8 years ago

Lately I've only had a shitty laptop so it was easier to just test without it, though you're right and eventually I did.

oninoni commented 8 years ago

Any chance this will be fixed soon?

TomyLobo commented 8 years ago

@bigdogmat should we just revert the PR that introduced the problem?

TomyLobo commented 8 years ago

That's #962 I guess. Looks like I did look at it, but the principal reviewer was @AbigailBuccaneer, who really should have tested this.

bigdogmat commented 8 years ago

I'd say that's fine, it's an output so nobody should be trying to change it anyway.