Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Code not acting the way i thought i would.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Walker




PostPosted: 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
Sponsor
sponsor
ModestExtremist




PostPosted: 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




PostPosted: 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




PostPosted: Fri Apr 02, 2004 11:51 pm   Post subject: (No subject)

Thank you both have some bits
Paul




PostPosted: Fri Apr 02, 2004 11:54 pm   Post subject: (No subject)

oops he posted that while I was working up my long post... sorry
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: