
-----------------------------------
Tricia
Fri Nov 12, 2004 9:18 pm

printing out a row of stars
-----------------------------------
i need help coz i wrote this code and it's not displaying anything...wat's wrong with it?
    var sides := 10
    for star : 1 .. 10
        drawfillstar (sides, 400, sides + 40, 450, 14)
        sides += 30 * 2
    end for

-----------------------------------
zylum
Fri Nov 12, 2004 9:26 pm


-----------------------------------
your y values are too high and the stars are being drawn off the screen:

var sides := 10
for star : 1 .. 10
    drawfillstar (sides, 200, sides + 40, 250, 14)
    sides += 30 * 2
end for

-----------------------------------
Tricia
Fri Nov 12, 2004 9:26 pm


-----------------------------------
please someone help?? i kno it's realy very basic but i seriously can't figure it out :oops:  :oops:

-----------------------------------
Tricia
Fri Nov 12, 2004 9:28 pm


-----------------------------------
your y values are too high and the stars are being drawn off the screen:

var sides := 10
for star : 1 .. 10
    drawfillstar (sides, 200, sides + 40, 250, 14)
    sides += 30 * 2
end for

sorry i kinda passed ur post but thanks for the help :D

-----------------------------------
Tricia
Fri Nov 12, 2004 9:42 pm


-----------------------------------
i don't think the code you gave me is working

-----------------------------------
zylum
Fri Nov 12, 2004 9:47 pm


-----------------------------------
it works for me...

try this:

var stars := 10
var Width := 30
var spaceWidth := 20
for star : 1 .. stars
    drawfillstar (Width * star + spaceWidth * star, maxy div 2 - Width div 2, Width * star + Width + spaceWidth * star, maxy div 2 + Width div 2, 14)
end for

-----------------------------------
Tricia
Fri Nov 12, 2004 9:53 pm


-----------------------------------
k thanks
