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

Username:   Password: 
 RegisterRegister   
 Help, if you wouldnt mind
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
platky




PostPosted: Fri Feb 20, 2009 11:08 pm   Post subject: Help, if you wouldnt mind

I just started Turing 2.5 weeks ago in my class and the assignments are so boring so i have been messing around. I am having a few problems which i cant seem to figure out:

1) I run out of ID numbers
2) The box im supposed to jump on doesn't really work. If you run into the side of it, you get teleported to on top witthout jumping

The character is just a makeshift pic so just ignore it...

Thanks for the help



Game.zip
 Description:
Game

Download
 Filename:  Game.zip
 Filesize:  6.9 KB
 Downloaded:  54 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
TheGuardian001




PostPosted: Sat Feb 21, 2009 12:59 am   Post subject: Re: Help, if you wouldnt mind

You're getting the out of ID numbers error because you create a new picture every single time the loop executes. When creating an image, you should only ever call Pic.FileNew ONCE for each image. Moving the Pic.FileNew should fix this.
Razgriz




PostPosted: Wed Feb 25, 2009 6:53 am   Post subject: RE:Help, if you wouldnt mind

Also, it's best to name your thread after what you need help on...

As it says in the sticky post, don't just post 'help' titles, as no one in the forum can really be sure of what the problem is, and because of such no one can really help.
Tony




PostPosted: Wed Feb 25, 2009 2:38 pm   Post subject: Re: Help, if you wouldnt mind

TheGuardian001 @ Sat Feb 21, 2009 12:59 am wrote:
you should only ever call Pic.FileNew ONCE for each image.

To be more precise, you should have Pic.Free for each Pic.FileNew used. Keep in mind that loading and freeing identical images inside the loop is redundant.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: