
-----------------------------------
Reality Check
Sat Apr 29, 2006 1:05 pm

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...



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...

-----------------------------------
do_pete
Sat Apr 29, 2006 1:33 pm


-----------------------------------
You should use descriptive titles... anyways, are the pics in the same folder as your code?

-----------------------------------
semin89
Sat Apr 29, 2006 3:10 pm

hello~
-----------------------------------
hi, i'm a grade 10 student studying in Canada~:) 
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.. 

var logoPicID, x, y:int
logoPicID := Pic.FileNew ("xxx.bmp") 
x := 200 
y := 300 
Pic.Draw (logoPicID, x, y, picCopy) 

[/code]

-----------------------------------
jamonathin
Sat Apr 29, 2006 3:59 pm

Re: hello~
-----------------------------------
ahaha lmfao . . sorry don't mean to be rude or anything, it's just i saw this:
hi, i'm a grade 10 student studying in Canada~:) 
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.

-----------------------------------
Cervantes
Sat Apr 29, 2006 4:17 pm

Re: hello~
-----------------------------------
ahaha lmfao . . sorry don't mean to be rude or anything, it's just i saw this:
hi, i'm a grade 10 student studying in Canada~:) 
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
Sat Apr 29, 2006 8:00 pm


-----------------------------------
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
Sat Apr 29, 2006 8:02 pm


-----------------------------------
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
Sat Apr 29, 2006 8:06 pm


-----------------------------------
never mind guys thanks alot.  I just needed to put my picture in the same directory as my code.

-----------------------------------
Cervantes
Sat Apr 29, 2006 8:13 pm


-----------------------------------
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
Mon May 01, 2006 8:35 am

Re: hello~
-----------------------------------

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:

-----------------------------------
[Gandalf]
Tue May 02, 2006 12:06 am

Re: hello~
-----------------------------------

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:
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).
