Posted 06 January 2013 - 03:44 AM
I have a paint program I am going to be using for TVs in our server and I seem to have a slight problem in the space function….Basically when you hit space, it does so,
Now the problem is, it seems to set the new frame to be = to pic[frame], which is right, but when Edit the old frame, it sets the new frame to the current frame and if I edit the new frame, the old frame is the new frame. So it is sorta like, frame 1 is equal to frame 2 and frame 2 is equal to frame 1….Sorta weird and I was wondering if there might be a way to fix it. I think it has something to do with making it equal pic[frame]. I believe what it is doing is saying, alright, lets change pic[frame][x][y] to the new color, and it is not actually making it equal like I want. I could be totally wrong.
if (not pic[frame+1]) then
table.insert(pic,frame+1,pic[frame])
frame = frame + 1
frawFrame()
end
Now the problem is, it seems to set the new frame to be = to pic[frame], which is right, but when Edit the old frame, it sets the new frame to the current frame and if I edit the new frame, the old frame is the new frame. So it is sorta like, frame 1 is equal to frame 2 and frame 2 is equal to frame 1….Sorta weird and I was wondering if there might be a way to fix it. I think it has something to do with making it equal pic[frame]. I believe what it is doing is saying, alright, lets change pic[frame][x][y] to the new color, and it is not actually making it equal like I want. I could be totally wrong.