What do you wanna do? A chess board or a board where black and white fields are randomly distributed?
Anyway your mistake is: random(1) returns anything from 0 to 1 and a frame number like 0,123153151412 doesn't exist. If you want it to be either 0 or 1 you coud use the expression floor(random(0,2)).
However, if you only want to create a chess board, use something like this:
localvariable = 0
array for each element XY: array set at (array.curx, array.cury) = localvariable
create chesstile at x = array.curx*tilesizeinpixel and y = array.curx*tilesizeinpixel
set chesstile framenumber = localvariable
- if localvarialbe = 0: set localvariable = 1
- else : set local variable = 0
This way you alternate 0 and 1 through your array, starting with 0. Additionally at each element the tile is created and framenumber is set.
If you create a chessboard like this, I suggest pasting all the tiles down to a canvas (with the canvas plugin) for better performance or just load an image of the board as tiled background instead of creating the tiles (you still can store information of pieces in your array).