For some reason when i run this code TIC-80 crashes
-- title: game title -- author: game developer -- desc: short description -- script: moon ticks = 1 cur = x: 2 y: 0 rot: 1 piece: 1 color: 1 PIECES = { { {{0,1,0,0}, {0,1,0,0}, {0,0,0,0}, {0,1,0,0}}, {{1,1,1,0}, {0,1,1,0}, {1,1,1,0}, {1,1,0,0}}, {{0,0,0,0}, {0,1,0,0}, {0,1,0,0}, {0,1,0,0}}, {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}}, }, } export TIC=-> cls 0 for i = 0,11 for j = 0,16 spr mget(i, j), 72+i*8, j*8 for i = 1,4 for j = 1,4 if PIECES[cur.piece][j][1][i] == 1 spr cur.color, 72+(cur.x + i)*8, (cur.y + j)*8 if ticks % 15 == 1 if collide(cur.x, cur.y+1) for i = 1,4 for j = 1,4 if PIECES[cur.piece][j][1][i] == 1 mset i+cur.x, j+cur.y, cur.color cur.y = 1 else cur.y += 1 ticks += 1 export collide = (x, y) -> for i = 1,4 for j = 1,4 if PIECES[cur.piece][j][1][i] == 1 if mget(x+i, y+j) > 1 return true return false