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: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Copy of Game2.zip |
Filesize: |
25.35 KB |
Downloaded: |
136 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
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
|
|
|
|
|
![](images/spacer.gif) |
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: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Copy of Game2.zip |
Filesize: |
25.36 KB |
Downloaded: |
111 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
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.
|
|
|
|
|
![](images/spacer.gif) |
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: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Copy of Game2.zip |
Filesize: |
25.4 KB |
Downloaded: |
124 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sun Dec 12, 2004 10:00 pm Post subject: (No subject) |
|
|
put setscreen ("offscreenonly") after that point.
|
|
|
|
|
![](images/spacer.gif) |
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
|
|
|
|
|
![](images/spacer.gif) |
|