Sorry... I misunderstood the code as well... Let me try it again. There are no rows in this code (besides printing the board).
You start the command with addqueen({},1} with a = {} and n = 1. n being the queen number and c being the columns.
It will start with c = 1, then look through at the board for arguments (in isplaceok).
If result = false it will loop the isplaceok again for a different i.
If result = true it will add the column number (c) to the n-th place in table a. Then it will do c+1 and repeat the loop again.
Though the addqueen command has an issue though...
It says:
for c= 1, N do
if isplaceok(a,n,c) then.
<rest of code>
It needs to say (iirc)
if isplaceok(a,n,c)==true then
<rest of code>
Hope this helped.
Update: EDITED ONCE MORE FFS I HAVEN'T CODED IN FOREVER!
Follow @SLO_MMORPG