Loading ...
Sorry, an error occurred while loading the content.
 

RE: [libertybasic] help with the SET command

Expand Messages
  • Stefan Pendl
    ... Depending on how you dimensioned your array, you always need to specify the X and Y coordinates. If you used: Dim Starts(100,2) You need to use for i = 1
    Message 1 of 5 , Mar 6, 2009
      >
      > I was trying to print a screen full of 'stars' with the set
      > command where I have a graphic box and I used a for loop and
      > an array called stars() as #space.gbox set " ";stars(b) and I
      > can't even see one 'star'. If anyone has any ideas I would
      > deeply appreciate it.
      >

      Depending on how you dimensioned your array, you always need to specify the X and Y coordinates.

      If you used:
      Dim Starts(100,2)
      You need to use
      for i = 1 to 100
      #space.gbox "set "; stars(i,1); " "; stars(i,2)
      next

      ---
      Stefan Pendl
    • Marc
      Thanks for the help guys. I now got it to work. It was dimensioned wrong. I also used the different color stars bill had in his code. Thanks again, Marc
      Message 2 of 5 , Mar 6, 2009
        Thanks for the help guys. I now got it to work. It was dimensioned wrong. I also used the different color stars bill had in his code. Thanks again,
        Marc


        --- In libertybasic@yahoogroups.com, "Stefan Pendl" <pendl2megabit@...> wrote:
        >
        > >
        > > I was trying to print a screen full of 'stars' with the set
        > > command where I have a graphic box and I used a for loop and
        > > an array called stars() as #space.gbox set " ";stars(b) and I
        > > can't even see one 'star'. If anyone has any ideas I would
        > > deeply appreciate it.
        > >
        >
        > Depending on how you dimensioned your array, you always need to specify the X and Y coordinates.
        >
        > If you used:
        > Dim Starts(100,2)
        > You need to use
        > for i = 1 to 100
        > #space.gbox "set "; stars(i,1); " "; stars(i,2)
        > next
        >
        > ---
        > Stefan Pendl
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.