Computer Science Canada

Slot Machine help

Author:  Scooter341 [ 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?

Author:  jamonathin [ Thu Apr 14, 2005 8:09 am ]
Post 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.

Author:  Scooter341 [ Fri Apr 15, 2005 9:30 am ]
Post 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?

Author:  jamonathin [ Fri Apr 15, 2005 11:20 am ]
Post 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.


: