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

Username:   Password: 
 RegisterRegister   
 My online game...Problem with pic.draw
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bill_ion_boi




PostPosted: 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



Copy of Game2.zip
 Description:

Download
 Filename:  Copy of Game2.zip
 Filesize:  25.35 KB
 Downloaded:  132 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: 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




PostPosted: Sun Dec 12, 2004 8:21 pm   Post subject: (No subject)

But now it give me an error saying picfile wasnt delcared


Copy of Game2.zip
 Description:

Download
 Filename:  Copy of Game2.zip
 Filesize:  25.36 KB
 Downloaded:  109 Time(s)

Cervantes




PostPosted: 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




PostPosted: 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?



Copy of Game2.zip
 Description:

Download
 Filename:  Copy of Game2.zip
 Filesize:  25.4 KB
 Downloaded:  122 Time(s)

Cervantes




PostPosted: Sun Dec 12, 2004 10:00 pm   Post subject: (No subject)

put setscreen ("offscreenonly") after that point.
bill_ion_boi




PostPosted: 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
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  [ 7 Posts ]
Jump to:   


Style:  
Search: