Log In  


Hey there, I'm just starting here with Pico-8, trying to understand the syntax.

I just want to create 2 one dimensional arrays numbered 1 to 10, and fill them with the value 63. But I can't seem to figure out how. Can anyone assist with this please?

x={}
y={}

for i = 1,10,1 do
x[i] = 63
y[i] = 63
end



1

Your code works fine for me. You can also use the add function to add a value to the end of an array, like this:

x={}
y={}

for i = 1,10 do
 add(x, 63)
 add(y, 63)
end

Thanks for the help!



[Please log in to post a comment]