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

Username:   Password: 
 RegisterRegister   
 Slot Machine help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Scooter341




PostPosted: Thu Apr 14, 2005 8:04 am   Post subject: Slot Machine help

I'm trying to now susbstitute pictures for letters in my slot program but i have no idea how to do it? can anyone here help me?
Sponsor
Sponsor
Sponsor
sponsor
jamonathin




PostPosted: Thu Apr 14, 2005 8:09 am   Post subject: (No subject)

Use an array.
code:
var pic : array 1 .. 5 of int
pic(1):=Pic.FileNew("cherry.bmp")
 . . .
pic(5):=Pic.FileNew("grape.bmp")

Now keep yoru random part, just do this:
code:

Pic.Draw ( pic (random_numb), x, y, picMerge)

just find a place to put the pictures, and do that instead of "put"ing the numbers.
Scooter341




PostPosted: Fri Apr 15, 2005 9:30 am   Post subject: (No subject)

i tried that and it came up with an error saying that the environment had a fatal error and then it crashed. Anyone else got ideas?
jamonathin




PostPosted: Fri Apr 15, 2005 11:20 am   Post subject: (No subject)

Scooter341 wrote:
i tried that and it came up with an error saying that the environment had a fatal error and then it crashed. Anyone else got ideas?

The enviroment had a fatal error? Maybe there's something else you should worry about. Either you need to update or your code is messed up, because that's the easiest way to do it.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: