Author |
Message |
bill_ion_boi
|
Posted: 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
Description: |
|
Download |
Filename: |
Copy of Game2.zip |
Filesize: |
25.35 KB |
Downloaded: |
132 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Cervantes
|
Posted: Sun Dec 12, 2004 8:11 pm Post subject: (No 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
|
|
|
|
|
|
bill_ion_boi
|
Posted: Sun Dec 12, 2004 8:21 pm Post subject: (No subject) |
|
|
But now it give me an error saying picfile wasnt delcared
Description: |
|
Download |
Filename: |
Copy of Game2.zip |
Filesize: |
25.36 KB |
Downloaded: |
109 Time(s) |
|
|
|
|
|
|
Cervantes
|
Posted: Sun Dec 12, 2004 8:47 pm Post subject: (No 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.
|
|
|
|
|
|
bill_ion_boi
|
Posted: Sun Dec 12, 2004 9:28 pm Post subject: (No 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?
Description: |
|
Download |
Filename: |
Copy of Game2.zip |
Filesize: |
25.4 KB |
Downloaded: |
122 Time(s) |
|
|
|
|
|
|
Cervantes
|
Posted: Sun Dec 12, 2004 10:00 pm Post subject: (No subject) |
|
|
put setscreen ("offscreenonly") after that point.
|
|
|
|
|
|
bill_ion_boi
|
Posted: Sun Dec 12, 2004 10:11 pm Post subject: (No 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
|
|
|
|
|
|
|