Code not acting the way i thought i would.
Author |
Message |
Walker
|
Posted: Fri Apr 02, 2004 11:32 pm Post subject: 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. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
ModestExtremist
|
Posted: Fri Apr 02, 2004 11:48 pm Post subject: (No subject) |
|
|
Yeah, you're using Pic.New fine. Your problem is you mixed up your parameters for Pic.Draw.
You should have:
code: |
Pic.Draw (background, 0, 0, picCopy)
|
MacDitty |
|
|
|
|
|
Paul
|
Posted: Fri Apr 02, 2004 11:49 pm Post subject: (No subject) |
|
|
lol if you check F10 parameters for Pic.Draw is:
code: |
Pic.Draw (picID, x, y, mode : int)
|
so this should be done
code: |
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
|
Posted: Fri Apr 02, 2004 11:51 pm Post subject: (No subject) |
|
|
Thank you both have some bits |
|
|
|
|
|
Paul
|
Posted: Fri Apr 02, 2004 11:54 pm Post subject: (No subject) |
|
|
oops he posted that while I was working up my long post... sorry |
|
|
|
|
|
|
|