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

P#140368 2024-01-20 19:26

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
P#140371 2024-01-20 19:48 ( Edited 2024-01-20 19:50)

Thanks for the help!

P#140373 2024-01-20 20:20

[Please log in to post a comment]