DireCoding20 Need assistance.

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

dragonhippie

New Member
Jul 29, 2019
50
0
0
I took Direwolf's coding for his Essentia automation idea (Here) and tryed to implement it into my local SMP server and i cannot find a way to get it to work.
I've looked at similar coding mistakes and googled the error and possible fixes and cannot find the reasoning for my situation.

Program for ButtonAPI = button
Program for Aspects = aspects

The error = aspects: 190: attempt to perform arithmetic __sub on nil and number
I only get it if i was to right click one of the aspects in the list. It is supposed to let me "add" the designated aspect to go get smelted through the Alchemical Furnace which is sourced through "Ethereal Essence" dropped by wisps or Nodes.

2015-09-20_22.48.21.png

The Front View :
non-Sphax users info: Voided jars (with filter tags) layer the wall of Peripherals Proxies with a 3x5 Advanced Monitors and Advanced Computer on the right of it. The aspectalyzer is behind the "Iron Chest" on the left of the monitor connected at the bottom by another Peripherals Proxy all cabled together and hooked to the Computer.

2015-09-20_22.48.47.png
Back of the Project + Selfie. (excuse the selfie, couldn't get a decent picture with wires blocking my way. :p)

2015-09-20_22.51.01.png
2015-09-20_23.15.14.png
Thanks for any help. This is probably an easy fix or total waste of time but i have spent hours trying to come up with a fix and coding is not really my strong suite when it comes to FTB packs. (i have though studied Python and basic Algorithm in University so no need to go full noob on me when explaining a possible fix :p)
 
Last edited:

Senseidragon

Well-Known Member
May 26, 2013
703
319
88
Without delving too deeply, the error is pointing at this line:

Code:
  button.label(7, 2, "Available: "..currEssentia.." is: "..(essCount[currEssentia]-1)*2)

And the error is basically telling you that the essCount array has probably not been initialised yet. It is a nil (non-value) rather than something like 5, or 27.

I can look more deeply into the issue if someone hasn't already solved it before I finish my breakfast.
 

dragonhippie

New Member
Jul 29, 2019
50
0
0
Without delving too deeply, the error is pointing at this line:

Code:
  button.label(7, 2, "Available: "..currEssentia.." is: "..(essCount[currEssentia]-1)*2)

And the error is basically telling you that the essCount array has probably not been initialised yet. It is a nil (non-value) rather than something like 5, or 27.

I can look more deeply into the issue if someone hasn't already solved it before I finish my breakfast.

thanks for the reply, but im still having the issue and don't know how to fix it with this information. D:
 

Senseidragon

Well-Known Member
May 26, 2013
703
319
88
I actually started rewriting the code, as there were a few other problems tucked away in the code as well. I altered the code to also properly display all of the essentia assuming you have a big enough monitor. I think my current pack had like 56 different types of essentia, and the original code could only display 51. Also it seemed to only process 49 slots from whatever iron chest you had it hooked up to.
 

Senseidragon

Well-Known Member
May 26, 2013
703
319
88
To clarify that original error I highlighted, it will likely crop up if the essentia you click on doesn't actually have any of that type in the chest. The code as you presented it is also very direction-specific. I figured that last part out the hard way. Oops. :rolleyes:
 

dragonhippie

New Member
Jul 29, 2019
50
0
0
To clarify that original error I highlighted, it will likely crop up if the essentia you click on doesn't actually have any of that type in the chest. The code as you presented it is also very direction-specific. I figured that last part out the hard way. Oops. :rolleyes:
but the error stated even when i did have the respectable item in the chest. Also i did change the inventory slots available and change the monitor size after the pictures.
 

dragonhippie

New Member
Jul 29, 2019
50
0
0
I actually started rewriting the code, as there were a few other problems tucked away in the code as well. I altered the code to also properly display all of the essentia assuming you have a big enough monitor. I think my current pack had like 56 different types of essentia, and the original code could only display 51. Also it seemed to only process 49 slots from whatever iron chest you had it hooked up to.

Any luck with the coding? If so, mind sharing it please? :)
 

Senseidragon

Well-Known Member
May 26, 2013
703
319
88
Yep, coding is going good. I was just trying to find a way to make it more generally useful, as the original code assumes you're loading the chest with essences (wisp/node droppings) and not beans or phials of essentia. I was looking at making the system smart enough to handle all three types, or even any object you happen to stuff in the chest. I'll get out an essence-only version, probably tomorrow, that should get you back up and running the quickest, and then I'll work on making it more broadly useful.
 

dragonhippie

New Member
Jul 29, 2019
50
0
0
Yep, coding is going good. I was just trying to find a way to make it more generally useful, as the original code assumes you're loading the chest with essences (wisp/node droppings) and not beans or phials of essentia. I was looking at making the system smart enough to handle all three types, or even any object you happen to stuff in the chest. I'll get out an essence-only version, probably tomorrow, that should get you back up and running the quickest, and then I'll work on making it more broadly useful.
Cheers, at the moment i'm still trying to fix what i have now, but when your coding is given i will hopefully scrap all of what i have and have a working system. :D
 

Senseidragon

Well-Known Member
May 26, 2013
703
319
88
Ok, done.

If you're just itching for the code, here it is:

The Button API: Pastebin 5VT7bMT9
The Aspects program: Pastebin a2V42NTV

Here are a few screenshots detailing how I tried to copy your setup:

An overview of the setup from the front.
C4z6xJt.jpg

Front, iron chest side
9YjJzrH.jpg

Peek at the aspectalyzer behind the iron chest
6rMTPqq.jpg

Forward view
qvDjIv4.jpg

Front view, computer side
yKoAE4u.jpg

Overview from the back
05WKf5a.jpg

Back, computer side
2li4X2K.jpg

Back, under the aspectalyzer
Zgmxk7v.jpg

Back, iron chest side
XVOWN0Q.jpg

My jar-filling pit crew
is9qBsl.jpg

Iron chest full of ethereal essences
poksPHr.jpg

I hope somebody finds this useful. :D

Edit: Before someone asks the inevitable "what did you actually change?"
- Commented code
- Cleaned up several variable names to make intent clearer
- Corrected logic in fillTable2 and refillAll
- Slight optimization of fillEss2
- Cosmetic addition of printWaitMessage
 
Last edited:
  • Like
Reactions: dragonhippie