Author |
Message |
Mr. Skittles
|
Posted: Mon Jun 20, 2005 6:31 pm Post subject: a little help with pic.draw please |
|
|
ok i am trying to have and image that comes down the screen and stops when it is at the bottom with all of the image visable... kinda like credits in a movie .... but it keeps giving me a "pic was freed" error what can i do to fix this? I honestly have no idea whats goign on and i would greatly appreceate any help.... thanks a million
loop
colourback (black)
cls
picy := picy - 10
Pic.Draw (picID, picx, picy, picCopy)
Pic.Free (picID)
end loop
if picy < 10 then
cls
colourback (white)
end if |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Mon Jun 20, 2005 6:40 pm Post subject: (No subject) |
|
|
Hi, Welcome to compsci!
1> Please use code tags as in
code: | loop
colourback (black)
cls
picy := picy - 10
Pic.Draw (picID, picx, picy, picCopy)
Pic.Free (picID)
end loop
if picy < 10 then
cls
colourback (white)
end if |
neat eh?
2> about your problem code: | if picy < 10 then
cls
exit
end if
|
try that? |
|
|
|
|
![](images/spacer.gif) |
Mr. Skittles
|
Posted: Mon Jun 20, 2005 6:52 pm Post subject: (No subject) |
|
|
Thanks man i will for sure use those tags next time..... but that didnt really help me i still and not getting it.... thanks tho |
|
|
|
|
![](images/spacer.gif) |
Token
![](http://server2.uploadit.org/files/token89-avatar1.jpg)
|
Posted: Mon Jun 20, 2005 6:55 pm Post subject: (No subject) |
|
|
code: |
loop
colourback (black)
picy := picy - 10
Pic.Draw (picID, picx, picy, picCopy)
cls
end loop
if picy < 10 then
cls
colourback (white)
end if |
this is the whole code, what your doing is clearing the picture information in the variable picID when u use Pic.Free |
|
|
|
|
![](images/spacer.gif) |
Mr. Skittles
|
Posted: Mon Jun 20, 2005 7:22 pm Post subject: (No subject) |
|
|
ok ya that works but now it gives me a" illegal picture ID number "0" picture was not sucsessfully created" error..... what that about? |
|
|
|
|
![](images/spacer.gif) |
Mr. Skittles
|
Posted: Mon Jun 20, 2005 7:32 pm Post subject: (No subject) |
|
|
anyone? help me please? |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Mon Jun 20, 2005 7:33 pm Post subject: (No subject) |
|
|
That means the picture was not successfully created. Incredibly, some of Turing's error messages are helpful! Probably, you misspelled the filename, messed up the extension, typed the path in wrong, or the image is not in the same folder as the turing file. Perhaps you're using an invalid file type, though I'm not sure if that would produce this error message.
EDIT: Give us time. The time between your two posts there was a grand total of 10 minutes. You have to have patience to succeed in this world. |
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Mon Jun 20, 2005 7:34 pm Post subject: (No subject) |
|
|
First you need to have a picture in the same directory, and then declare it in your program. Look in the tutorials section - first post will help. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
ZeroPaladn
|
Posted: Mon Jun 20, 2005 7:38 pm Post subject: (No subject) |
|
|
I have some code at school that might be able to help you. One problem, It's 8:30 PM here so ill post it tomorow. |
|
|
|
|
![](images/spacer.gif) |
Token
![](http://server2.uploadit.org/files/token89-avatar1.jpg)
|
Posted: Mon Jun 20, 2005 7:41 pm Post subject: (No subject) |
|
|
Cervantes wrote: You have to have patience to succeed in this world.
that is oh so true especially with turing
i think people take for granted the fact that there are constantly people looking to help on the siteand usually questions get answered so quickly |
|
|
|
|
![](images/spacer.gif) |
Mr. Skittles
|
Posted: Mon Jun 20, 2005 9:34 pm Post subject: (No subject) |
|
|
Thanks A LOT for all your help |
|
|
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Tue Jun 21, 2005 11:12 am Post subject: (No subject) |
|
|
code: | var picID := Pic.FileNew ("s1.jpg")
var picy : int := maxy
var picx : int := maxx div 2
loop
colourback (black)
cls
picy := picy - 10
Pic.Draw (picID, picx, picy, picCopy)
exit when picy < 10
delay (100)
end loop
colorback (255)
cls
|
Ok, i didn't pay attention to the Pic.Free you put there. This code saves memory thats being used up by turing. Everytime your code had to open the image file again and again. This saves time via memory. |
|
|
|
|
![](images/spacer.gif) |
|