Every time i try to run peripheral.getMethods() on an ICBMLauncher it just returns "table: 502cb323" or something like that. Am i doing something wrong?
peripheral.getMethods() help
Started by jewelshisen, Jan 20 2013 04:11 AM
6 replies to this topic
#1
Posted 20 January 2013 - 04:11 AM
#2
Posted 20 January 2013 - 04:15 AM
no this is correct... peripheral.getMethods() returns a table of all the methods you can call on the peripheral... to look at these functions names just do this
for k,_ in pairs( peripheral.getMethods( side ) ) do print( k ) end
#3
Posted 20 January 2013 - 04:19 AM
Oh... ok then.
#4
Posted 20 January 2013 - 04:36 AM
To actually use those methods, you'll need to assign the table:
local tpm = peripheral.getMethods(side) for k in pairs(tpm) do print(k) endUse tpm.methodName() to call the method listed as methodName (or tpm.whatever() to call whatever).
Edited by ChunLing, 20 January 2013 - 04:36 AM.
#5
Posted 20 January 2013 - 04:43 AM
Ok new problem. The methods are all just numbers. So how do I use it?
#6
Posted 20 January 2013 - 04:49 AM
jewelshisen, on 20 January 2013 - 04:43 AM, said:
Ok new problem. The methods are all just numbers. So how do I use it?
for _, v in pairs( peripheral.getMethods( side ) ) do print( v ) endthat will get you the method names.... i forgot that ICBM has their methods thing done wrong...
EDIT:
how all peripherals react with the getMethods...
{ function name, the actual function! }
how ICBM reacts with the getMethods...
{ function name }
it doesn't actually get the methods, it gets their name...... stupid ICBM devs...
Edited by TheOriginalBIT, 20 January 2013 - 04:51 AM.
#7
Posted 20 January 2013 - 04:59 AM
Yes! Got it working now!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











