I dont know what is wrong in my code.
After 2 hours trying to fix it, I preffer post here for if somebody can found any bug or for what reson bilt3D says "array index out of bounds"
thanks
After 2 hours trying to fix it, I preffer post here for if somebody can found any bug or for what reson bilt3D says "array index out of bounds"
thanks
Graphics 640,480,16,2 Global cu ; size square Global rej ;separation 2 pinxels if grid exis Global cx Global zx Global zy cu = 4: rej =2 zx=107 zy=78 Dim zoom%(zx,xy) ;;MAIN LOOP;; While Not KeyDown(1) makegrid() Wend End ;;END;; Function makegrid() Cls x1=0 :x2=cu y1=0 :y2=cu For x=1 To zx y1=0 :y2=cu For y=1 To zy If grid=True Then If zoom%(x,y) = 0 Then Color 30,30,30 Rect x1,y1,x2,y2,1 EndIf If grid=False Then Color 0,0,0 EndIf If zoom%(x,y)=1 Then Color 255,255,155 Rect x1,y1,x2,y2,1 EndIf y1=y1+cu+rej Next x1=x1+cu+rej Next End Function