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

Username:   Password: 
 RegisterRegister   
 Some major help needed...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Reality Check




PostPosted: Sat Apr 29, 2006 1:05 pm   Post subject: Some major help needed...

Ok so I'm having trouble loading in a picture into Turing. I tried it myself for the last 45 minutes and browsed other topics and no help. Its killing me. I keep getting this error:

Illegal Picture ID number '0'. (Probable cause: Picture was not successfully created).

Here is my exact code...



code:
var picID : int := Pic.FileNew ("dice.bmp")
Pic.Draw (picID, maxx div 2, maxy div 2, 0)


I've tried numerous things like: Change directory of file, change name, reinstall turing. I'm sure my file is a BMP and even tried doing one with JPG. Neither is working. Now, the spacegame that comes with turing is working fine and all the pictures load. So, I tried loading the pictures from that game (the 'space' one) and it didn't work. I did this to make sure nothing is wrong my picture file and I tried 3 other images and all gave me the same thing. I'm positive everything is spelled out correctly. I don't see what I'm doing wrong...
Sponsor
Sponsor
Sponsor
sponsor
do_pete




PostPosted: Sat Apr 29, 2006 1:33 pm   Post subject: (No subject)

You should use descriptive titles... anyways, are the pics in the same folder as your code?
semin89




PostPosted: Sat Apr 29, 2006 3:10 pm   Post subject: hello~

hi, i'm a grade 10 student studying in Canada~Smile
this is my first time replying!! (i just registered today~~)


-check the picture that you saved (in the same folder as the program) and see if its name is the same as the one that you put in the program..
-perhaps you put "dice.bmp" when you saved the picture as "dice pic.bmp"
-perhaps you put "dice.bmp" when you saved the picture as "dice.jpg".


anyway.. have a great day!

p.s for my program, i put..

code:
var logoPicID, x, y:int
logoPicID := Pic.FileNew ("xxx.bmp")
x := 200
y := 300
Pic.Draw (logoPicID, x, y, picCopy)


[/code]
jamonathin




PostPosted: Sat Apr 29, 2006 3:59 pm   Post subject: Re: hello~

ahaha lmfao . . sorry don't mean to be rude or anything, it's just i saw this:
semin89 wrote:
hi, i'm a grade 10 student studying in Canada~Smile
this is my first time replying!! (i just registered today~~)

checked if it was his first post (it was) then saw he had -4 bits, sorry just funny.

Anyways on topic, try out this program. If it doesn't work then update your Turing on Holtsofts website, if it does work, pay attention to the code and listen to what the other guys said.



spaceShip.zip
 Description:

Download
 Filename:  spaceShip.zip
 Filesize:  1.75 KB
 Downloaded:  77 Time(s)

Cervantes




PostPosted: Sat Apr 29, 2006 4:17 pm   Post subject: Re: hello~

jamonathin wrote:
ahaha lmfao . . sorry don't mean to be rude or anything, it's just i saw this:
semin89 wrote:
hi, i'm a grade 10 student studying in Canada~Smile
this is my first time replying!! (i just registered today~~)

checked if it was his first post (it was) then saw he had -4 bits, sorry just funny.

That would be because he made a reply, deleted it, then made this reply. Possibly because he wanted to change something in his message, so instead of posting again he did that, like a good user. Welcome, semin89!

Reality Check: One of the delicious features that Windows has is that windows explorer, by default, will not display the extensions for files of known filetype. So if you have a file called "dice.bmp", it will only show up as "dice" in windows explorer. It is possible that you tried to rename this file, and in so doing typed in "dice.bmp", so now the actual filename is "dice.bmp.bmp". Make sure that's not what the file's actually called.

You can do this by turning off this wonderful feature. In Windows Explorer, Tools -> Options -> Views -> scroll down a bit and uncheck the "Hide extensions of known filetypes" box. (These instructions are by memory only. The "views" tab might not be right...)
Reality Check




PostPosted: Sat Apr 29, 2006 8:00 pm   Post subject: (No subject)

Yea I know that windows hides the extension. I did not rename it dice.bmp or anything. Anyways, someone said that it has to be in the same folder as my code? Meaning the same folder the Turing is in?
Reality Check




PostPosted: Sat Apr 29, 2006 8:02 pm   Post subject: (No subject)

Also, to the guy that sent me the code with the spaceship thingy it didn't work. I opened the file and all and got the same exact error...the line of code that drew the picture was highlighted.
Reality Check




PostPosted: Sat Apr 29, 2006 8:06 pm   Post subject: (No subject)

never mind guys thanks alot. I just needed to put my picture in the same directory as my code.
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sat Apr 29, 2006 8:13 pm   Post subject: (No subject)

Reality Check wrote:
Also, to the guy that sent me the code with the spaceship thingy it didn't work. I opened the file and all and got the same exact error...the line of code that drew the picture was highlighted.

I guess you didn't actually try to extract the files, but rather opened the .t file directly (extracting it to a temporary file).
codemage




PostPosted: Mon May 01, 2006 8:35 am   Post subject: Re: hello~

Cervantes wrote:

That would be because he made a reply, deleted it, then made this reply. Possibly because he wanted to change something in his message, so instead of posting again he did that, like a good user. Welcome, semin89!


Shouldn't bits be subtracted b/c of deleted posts? Anyone with the ability to create macros could cash in on a lot of free bits that way. Evil or Very Mad
[Gandalf]




PostPosted: Tue May 02, 2006 12:06 am   Post subject: Re: hello~

codemage wrote:
Cervantes wrote:

That would be because he made a reply, deleted it, then made this reply. Possibly because he wanted to change something in his message, so instead of posting again he did that, like a good user. Welcome, semin89!


Shouldn't bits be subtracted b/c of deleted posts? Anyone with the ability to create macros could cash in on a lot of free bits that way. Evil or Very Mad

Err... What? Bits are subtracted because of deleted posts... +2 bits for a post, -5 bits for a deleted post = -3 bits per deleted post. Really, I've always thought that keeping your posts clean would be something to be encouraged (no loss or gaining of bits).
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  [ 11 Posts ]
Jump to:   


Style:  
Search: