This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
emanuel12324's profile picture

Concatenate help!

Started by emanuel12324, 20 February 2017 - 04:14 AM
emanuel12324 #1
Posted 20 February 2017 - 05:14 AM
Hi everyone!

I'm working on a fairly large project using lua (obviously) and everything has been going smoothly up until now. All of my code was working up until the last couple of changes I made but I can't seem to figure out what the issue is.

My code is can be found here:
http://pastebin.com/ycpG1rEd

The error I keep getting is this:

bios:91: attempt to concatenate nil and string

If anyone can see what I'm not seeing, please let me know as I'm starting to get pretty angry :P/>

Thanks in advance,
Emanuel E.
Bomb Bloke #2
Posted 20 February 2017 - 09:52 AM
"bios" is a ComputerCraft file; without knowing which version of the mod you're running, it's hard to predict what that line actually looks like, exactly. Best I can make out it's probably one of your string.find() calls causing it though.

This sounds like a job for trace.
emanuel12324 #3
Posted 20 February 2017 - 02:12 PM
Thanks for your pointer there. I'll have to check it out when I get home later today.

Also that little trace program looks really interesting, so I'll give that a shot too.

Also I'm in whatever computer craft version is in Tekkit Legends's newest version, whatever that may be as I can't see it right now.
emanuel12324 #4
Posted 20 February 2017 - 11:46 PM
Alright, so it seems that running

trace startup
does nothing. I made sure to remove the read()'s that were in the code and replace them with the expected values. I did test it with the changes to no avail.

Trace doesn't return anything at all…

I'll look into the various string.find calls and see if I find something.
emanuel12324 #5
Posted 21 February 2017 - 12:16 AM
Got it!

After looking into my code more thoughtfuly, per se, I decided to put print() in a lot of places and see what my actual values were. It was there that I noticed that the values going into my order() function weren't being set!

I finally narrowed it down to the fact that I was setting my inputs locally within while loops instead of globally, or atleast high enough in the ladder for order() to read them. Wonder who did that? :huh:/>

Anyway, it didn't work and now it does haha!

Thanks for your help BB!

Regards,
Emanuel