Closed avp216 closed 11 years ago
I guess It's a bug of the new wire advanced tool. Button should show "Set" input, instead of that it shows nothing. I reported this to @Divran before, but after update it stopped erroring, and it showed the input so I did not remind him of this. Hopefully now he can look into it.
Thing is, I have no idea what you are talking about lol... all this set input and advanced wire tool stuff. I just tried both wire tools that were available (something that said legacy? and the adv one you are talking about) Both gave me that error when I try and use it on something like a button. I never saw anything called set input :/
Is there no way to remedy this? Remember, this is my first time using wiremod.. EVER.
If both tools cause this error then the problem is most likely somewhere else.
Both the wire tools cause this problem... Apparently there is no solution to this?
@avp216, please post the error you get when using the legacy tool - it may be similar, but it won't be the same. Thanks.
Okay, i just tried the legacy first, it doesn't do anything at all. Doesn't even give an error. It can't be used. The Advanced one gives the aforementioned error.
Okay, apparently, i don't even have to USE the tool for the error to pop up. As soon as i click the wire tool, it gives me that error.
So... is the tool I made still around to try?
https://github.com/wiremod/wire/blob/master/lua/weapons/gmod_tool/stools/wire_adv.lua#L420 this is an "end"... are you sure you're up to date?
EDIT: nm, the change happened between your last 2 posts. update anyway and try, though
Update what?? I just installed wiremod via the workshop :/
ah then divran might not have updated that. https://github.com/wiremod/wire/blob/workshop/lua/weapons/gmod_tool/stools/wire_adv.lua#L420
ok things that might throw that particular error in that line:
self == nil
- impossible because that would go boom in line 410trace == nil
- impossible because that would go boom in line 409self.CurrentWireIndex == nil
- can throw that error due to a bug in glua (unless garry fixed the error message in the meantime to reflect that the index is nil and not the table)inputs[self.CurrentWireIndex] == nil
- can also throw that error@Divran, why didn't you nil-check that thing? It's not like it's surprising to have wire ents with no inputs or no outputs... my wire tool avoids that issue altogether, btw, by not relying on indexes but on names, for permanent storage.
I also just noticed I was storing the last input and output used for each ent, separately, until the tool is holstered. That's something your tool doesn't seem to do from looking at the code... That begs the question: how well did you analyze my wire tool's feature set before deciding to replace it with yours?
I have no idea what is going on here... AT ALL....Everything you just wrote was gibberish to me lol... Apparently I am using the wrong Wiremod? I downloaded it using the workshop.... So lost...
no no you didnt do anything wrong. If anyone, @Divran did :)
Oh... okay lol. But I still can't use the wire tool :D Just saying lol. Don't want to sound like an ass or anything :)
@avp216 What you called gibberish earlier is an analysis of what could be wrong. They are already trying to figure out what is happening and fixing it :)
@TomyLobo If it only happens on wire ents without in-/outputs, why does the error message appear when merely selecting the tool? I didn't confirm the bug myself yet, but that doesn't make sense to me.
@TomyLobo My tool remembers indexes for each entity separately as well. I didn't analyze your tool's feature set a whole lot. I had used it a lot though. My tool should now have all the features yours did, with the most recent update.
I don't nil check what thing? I have several checks to ensure you don't click a nonexistant input or output, but only one such check for each situation. I don't like to have unecessary checks. I learned that when I made PewPew (which had tons of unecessary checks all over the place, most of which checked the same thing 3 or 4 times in a row).
you need to employ preconditions then
Oh, alrighty then! I shall let the ones in charge solve this :) I will merely watch and pretend to know what is going on lol. Looking forward for this to be solved so I can actually use the thing lol XD
uh idk whats wrong, or even if anything is wrong at all
Don't give up! My future stupid inventions rely on this working XD
Tried to confirm this bug with newest master and was not getting any Lua errors. However, I was not able to wire anything with the wire advanced tool, if the gate I was wiring to had only one output. With the Legacy tool it worked fine. I think c76916a310ca47a278b3769ec36fb73870c6ee21 is at fault here.
Exactly the same with workshop. (Only one commit behind, though) Works fine with workshop^ (one commit before the one I named earlier) @Divran
I'll take another look
EDIT: Sigh, yep I'm getting the same problem now. Gotta love it when it works during testing but not afterwards... This has happened twice before. Either I'm going crazy or the lua code isn't being reloaded sometimes. Oh well I'm fixing it now. And I'll try to be more thorough next time. Several map reloads should do it. EDIT: Alright I've got it fixed. Now single output wiring should work for real. As soon as I commit it. EDIT: https://github.com/wiremod/wire/commit/e6b27e33422c1b8285b91e223def215dc260e4e6
I am sensing progress. Too bad i don't understand any of it :) Still, thank you all for still working on this. Appreciate the effort :)
@avp216: When creating a wire between two devices, you first select the device that will receive the signal (the input device, such as a Turret, Thruster, Hydraulic Controller, etc), then you select the device that will output a signal (the output device, such as a Button, Ranger, Pod Controller, etc).
This error you reported specifically occured when you started a wire from a device with no inputs (such as a Button). I have now fixed this error, but note that you appear to have been wiring backwards.
Though as an aside, buttons can have the input "Set" if they are "Toggle Buttons" (its a setting in the button cpanel), rangers do have some inputs (for where to point the beam), and Pod Controllers have plenty of inputs too, but they're primarily used as output devices.
yep it worked :+1: Really happy! Thanks for the effort guys :)
A duplicate for this error showed up: #473
I'm using a fresh install of GMod and the Workshop version of Wiremod.
I placed a button from the wire menu. I can use it and it indicates that it's being pressed. When I attempt to wire something to the button with the
wire_adv
tool, or I use the button while wielding the tool, this error shows in the console:Thanks!