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

Username:   Password: 
 RegisterRegister   
 Problem with Picture
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Piro24




PostPosted: Sat Dec 23, 2006 1:54 pm   Post subject: Problem with Picture

I am opening a picture and it works fine

procedure drawMachine
var machine : int := Pic.FileNew ("slotMachine.BMP")
machine := Pic.Scale (machine, maxx, maxy)
Pic.Draw (machine, 0, 0, picCopy)
end drawMachine

When I call that procedure it opens up my picture just fine. But after about 30 seconds it crashes. I don't understand why it would load then crash? It gives me the error "Picture was no created properly"
Sponsor
Sponsor
Sponsor
sponsor
StealthArcher




PostPosted: Sat Dec 23, 2006 2:10 pm   Post subject: (No subject)

Best I can remember, turing will try to load all declared pics, and will not show an error when one does not exist, hoiwever it will shopw sn error when you try to use the picture later on.
DIIST




PostPosted: Sat Dec 23, 2006 5:07 pm   Post subject: (No subject)

The Problem is you need to free you resourses, ie you need to "Pic. Free(machine)" the picture once you don using it or in this case at the end of the procedure drawmachine. Other wise you will constantly create piuctures in memory and this will eveuntally casue the program to crash. I hope that was of some help. Wink
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  [ 3 Posts ]
Jump to:   


Style:  
Search: