Hallo. Have a problem with tables. After entring a number, from multiple tables to a specific table can be selected. From this a llimitid number are displayed. An example follows. What is wrong in my Code?
-- Tables - need help
--
-- Use this function to perform your initial setup
function setup()
print("Hello World!")
t1={}
t2={}
t3={}
t1={4,15,33,22,45,29}
t2={18,24,13,2,105,32}
t3={56,47,66,71,89,122}
--input n = 2
--input r = 5
n=2; r=5
--show number 5 in table t2
print("n = ",n) --> 2
print("r = ",r) --> 5
m=("t" ..n .."[" ..r .."]")
print("m = ",m) --> t2[5]
p = m
print("p = ", p) --> t2[5]
print("t2[r] = ", t2[r]) --> 105
p=(m)[r]
print("p =",p) --> nil
p1=m[r]
print("p1 =",p1) --> nil
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(40, 40, 50)
-- This sets the line thickness
strokeWidth(5)
-- Do your drawing here
end