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

addIcon question

Started by Neywiny, 03 April 2014 - 08:54 PM
Neywiny #1
Posted 03 April 2014 - 10:54 PM
so sine this is the closest thread to my problem, and they overlap, I thought why not here. Anyways; I'm trying to make a program that when I chat in something like "$$Main_Base_Power", it will draw an icon and do other irrelevant things, but I can't seem to get this drawIcon thing to work. first, I tried just wrapping it and using drawIcon, but that didn't work, so I typed in the public ILuaObject, and when I ran it it said that on the first line of that block of code there is a missing '='. exact message is as follows: "bios:339: [string "b"]:2: '=' expected. I tried to draw a box to check if it was wrapped right, and that worked, but drawIcon doesn't.
Lyqyd #2
Posted 04 April 2014 - 02:22 AM
Split into new topic.
theoriginalbit #3
Posted 04 April 2014 - 07:09 AM
please post your code and we will asset further, please also post the full error message when you're trying to add an icon.

typing the 'public ILuaObject' definitely won't do anything as this is Java code, not Lua code.
Neywiny #4
Posted 04 April 2014 - 06:42 PM

bridge = peripheral.wrap("right")
bridge.addIcon(0, 0, 1, 0)
I used the value 1 b/c I thought that maybe it didn't work with resonant energy cells, of which gave me an id of 2004 with a meta of 4. error code is as follows:

t:2: attempt to call nil
I named the program t for test, just incase you were wondering.
theoriginalbit #5
Posted 04 April 2014 - 11:51 PM
And OpenPeripheral-Addon version?

I named the program t for test, just incase you were wondering.
that's okay, figured that from the error message ;)/>
Neywiny #6
Posted 05 April 2014 - 12:55 AM
OpenPeripheral-0.2.1-preview8
theoriginalbit #7
Posted 05 April 2014 - 01:05 AM
OpenPeripheral-0.2.1-preview8
ah, there's your problem. addIcon is only available in the newsier versions of OpenPeripheral… basically from about 112 or so builds after the version you're running.
Neywiny #8
Posted 05 April 2014 - 01:16 AM
oh my god that fixed it. I will now make a new thread due to certain people (everyone) not liking how I always tangent on forums. I'd prefer if you looked at it, no Idea what to name it, but it will be very help needed and I understand this is the place to get it. Essentially I need a complicated code and have 1% of the knowledge necessary for it.
theoriginalbit #9
Posted 05 April 2014 - 01:25 AM
I will now make a new thread
if it is anything to do with this same program/problem then do no create a new thread. you should try to keep everything related in the same thread.