I know how to get documentation in game, but I want more detail on the return of the getPlayerData() method. I know it returns a table, but I wanna know all the values in the table and such
OpenPeripherals: Sensor documentation?
Started by austinv11, May 01 2014 11:40 PM
3 replies to this topic
#1
Posted 01 May 2014 - 11:40 PM
#2
Posted 01 May 2014 - 11:44 PM
It's silly that we have to do this, but use a pairs for loop to get the contents of the table.
for k,v in pairs(table) do print(k.." : "..v) end
#3
Posted 01 May 2014 - 11:51 PM
CometWolf, on 01 May 2014 - 11:44 PM, said:
It's silly that we have to do this, but use a pairs for loop to get the contents of the table.
for k,v in pairs(table) do print(k.." : "..v) end
#4
Posted 01 May 2014 - 11:55 PM
You're using a sensor, what do you think coords and health is...?
Just look at the results of the loop and use your head. If you know an index holds a table, then loop that instead.
Just look at the results of the loop and use your head. If you know an index holds a table, then loop that instead.
for k,v in pairs(table.index) do print(k.." : "..v) end
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











