Computer Science Canada

My online game...Problem with pic.draw

Author:  bill_ion_boi [ Sun Dec 12, 2004 5:53 pm ]
Post subject:  My online game...Problem with pic.draw

I would like to know why i get this error when i run the game?

code:

        Pic.Draw (picFile1, player (2).x, player (2).y, picMerge)
        Pic.Free (picFile1)

Argument wrong type

Author:  Cervantes [ Sun Dec 12, 2004 8:11 pm ]
Post subject: 

The first parameter of Pic.Draw must be an integer. You have it as a string. What you need to do is make an integer variable and assign it like this:
code:

var picID : int := Pic.FileNew (picFile1)


Hope that helps

Author:  bill_ion_boi [ Sun Dec 12, 2004 8:21 pm ]
Post subject: 

But now it give me an error saying picfile wasnt delcared

Author:  Cervantes [ Sun Dec 12, 2004 8:47 pm ]
Post subject: 

Probably because a.) you've mistyped the variable names or b.) you declared your variable inside an if statement. Therefore, that variable might not actually be declared.

Author:  bill_ion_boi [ Sun Dec 12, 2004 9:28 pm ]
Post subject: 

Hey I got it to work, thanks to you cervantes, but theres a little bug. Its not showing the text unless i click "x" to close it and then when it gives me a warning dialoge "are you sure u want to...." i can see the text.

Could you please take a few more minutes to guide me? I looked at it but i still dont have a clue?

Author:  Cervantes [ Sun Dec 12, 2004 10:00 pm ]
Post subject: 

put setscreen ("offscreenonly") after that point.

Author:  bill_ion_boi [ Sun Dec 12, 2004 10:11 pm ]
Post subject: 

cerventes could you possibly run the program to test it via running the program twice, in one as a server and in the other as a client?
I have done so and it tells me im connected even when i right down anything as the comp. ip


: