
-----------------------------------
Walker
Fri Apr 02, 2004 11:32 pm

Code not acting the way i thought i would.
-----------------------------------
im using picnew to take a screen shot then picdraw to draw it later
when i run the code it says illegal pitcure number 0 (picture not created) or something and expample of the code im using is

var background: int
Draw.FillBox (45, 12, maxx, maxy, 255) % draws random stuff
background := Pic.New (1, 1, maxx-1, maxy-1)
cls
Pic.Draw (0, 0, background,picCopy)

this gives me an error, I have checked  f10 and so on and according to that this should work. Did i make a mistake, is my computer screwed or does this worjk for everyone else and not me.

-----------------------------------
ModestExtremist
Fri Apr 02, 2004 11:48 pm


-----------------------------------
Yeah, you're using Pic.New fine.  Your problem is you mixed up your parameters for Pic.Draw.

You should have:

Pic.Draw (background, 0, 0, picCopy)



MacDitty

-----------------------------------
Paul
Fri Apr 02, 2004 11:49 pm


-----------------------------------
lol if you check F10 parameters for Pic.Draw is:

Pic.Draw (picID, x, y, mode : int)

so this should be done

var background: int
Draw.FillBox (45, 12, maxx, maxy, 255)
background:=Pic.New (1, 1, maxy-1, maxy-1)
cls
Pic.Draw (background, 0, 0, picCopy)
        Pic.Free (background)

background is the picID, and should come first in Pic.Draw.

-----------------------------------
Walker
Fri Apr 02, 2004 11:51 pm


-----------------------------------
Thank you both have some bits

-----------------------------------
Paul
Fri Apr 02, 2004 11:54 pm


-----------------------------------
oops he posted that while I was working up my long post... sorry
