
-----------------------------------
Jonny Tight Lips
Sat Sep 25, 2004 11:31 pm

troubles with DanSprites
-----------------------------------
well I'm trying to use DanSprites and I keep getting an error in the accualy DanSprites code. Well her is my code.

include "mapdraw"
include "DanSprite.tu"
var mychar : int := DanSprite.newPic (100,100, "C:\\Documents and Settings\\James\\Desktop\\compsci\\tile set 1\\backward arrow.bmp")
DanSprite.setMode(pic,DanSprite.MERGE)
var myx , myy : int := 100

var chars : array char of boolean
loop
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
myy += 5
elsif chars (KEY_DOWN_ARROW) then
myy-=5
end if
if chars (KEY_LEFT_ARROW) then
myx-= 5
elsif chars (KEY_RIGHT_ARROW) then
myy+= 5
end if
DanSprite.movePic (myx,myy,mychar)
end loop
mapdraw is an include file that I havn't got around to including

and then when I run it it opens the dansprite code and highlights the uinit command and says "unit has not been declared" whats going wrong? Thanx for the help

-----------------------------------
Jonny Tight Lips
Sun Sep 26, 2004 12:08 am


-----------------------------------
Also got another question while I'm at it. With DanSprite.changePic.
Here's my code:
var mychar : int := DanSprite.newPic (100, 100, "C:\\Documents and Settings\\James\\Desktop\\compsci\\zelda sprites\\backward arrow.bmp")
DanSprite.setMode (mychar, DanSprite.MERGE)
var myx, myy : int := 100
DanSprite.chagePic(myx, myy, "C:\\Documents and Settings\\James\\Desktop\\compsci\\zelda sprites\\left walking1.bmp", mychar)

The error I get is in the Dansprite code again it higlights Pic.Free (picID) and says Illigal picture ID number "1". Any one got any ideas on this one?

-----------------------------------
Fire_Storm
Sun Sep 26, 2004 10:57 am


-----------------------------------
good work on stealing my code  :wink:

-----------------------------------
SuperGenius
Sun Sep 26, 2004 6:24 pm


-----------------------------------
it doesnt seem like the code is that distinctive... seems to me like it is possible that he made it up on his own. The code is pretty basic so it's not as if there are a ton of ways to accomplish what the code does.

-----------------------------------
Jonny Tight Lips
Sun Sep 26, 2004 9:26 pm


-----------------------------------
I didn't steal anything from anyone! That is the basic set up of dansprites and IF I DID COMPY ANYONE IT  WAS HACKER DAN not you! I havn't even seen your code anywhere and also that fact that that code doesn't work means that I didn't copy you now did I becasue if I did then the code WOULD work unless your.... I'll stop now b4 I get in trouble from the mods.

-----------------------------------
AsianSensation
Sun Sep 26, 2004 10:13 pm


-----------------------------------
Uh oh, better do my job now before people start to flame each other.

First, let's get a few things clear.

1. It's highly improbable that Johnny stole Fire_Storm's code, since it is a block of pretty simple code. And saying someone stole it from you is like saying I stole the usage of var MyName := "AsianSensation".

2. Maybe Fire_Storm was being sarcastic/cynical/humorous in a weird sense. He did use the  :wink: emoticon.....

So stop it with all these nonsense, I'll leave the topic open because the question has not been answered. More spam and it's Locking time.

-----------------------------------
Jonny Tight Lips
Mon Sep 27, 2004 4:41 pm


-----------------------------------
Well yah. Anyways I still need help with the DanSprite.ChangePic stuff I got the other first one figured out by my self but I just don't understand how to use the changePic command. Plz help me  :(

-----------------------------------
Paul
Mon Sep 27, 2004 7:35 pm


-----------------------------------
Um... I made something crappy using dansprite a long while ago, I'm too lazy to look but I'm sure if u search you'll find it. Plus it might help you or not help you, idk. um, search dansprite/dansprites in turing source code or submissions I guess.
EDIT: a screw it, here it is 
http://www.compsci.ca/v2/viewtopic.php?t=4681&highlight=dansprite

-----------------------------------
Dan
Tue Sep 28, 2004 3:16 pm

Re: troubles with DanSprites
-----------------------------------
well I'm trying to use DanSprites and I keep getting an error in the accualy DanSprites code. Well her is my code.

include "mapdraw"
include "DanSprite.tu"
var mychar : int := DanSprite.newPic (100,100, "C:\\Documents and Settings\\James\\Desktop\\compsci\\tile set 1\\backward arrow.bmp")
DanSprite.setMode(pic,DanSprite.MERGE)
var myx , myy : int := 100

var chars : array char of boolean
loop
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
myy += 5
elsif chars (KEY_DOWN_ARROW) then
myy-=5
end if
if chars (KEY_LEFT_ARROW) then
myx-= 5
elsif chars (KEY_RIGHT_ARROW) then
myy+= 5
end if
DanSprite.movePic (myx,myy,mychar)
end loop
mapdraw is an include file that I havn't got around to including

and then when I run it it opens the dansprite code and highlights the uinit command and says "unit has not been declared" whats going wrong? Thanx for the help

dose it work when you do not have the include "mapdraw" ?



Also got another question while I'm at it. With DanSprite.changePic.
Here's my code:
Code:
var mychar : int := DanSprite.newPic (100, 100, "C:\\Documents and Settings\\James\\Desktop\\compsci\\zelda sprites\\backward arrow.bmp")
DanSprite.setMode (mychar, DanSprite.MERGE)
var myx, myy : int := 100
DanSprite.chagePic(myx, myy, "C:\\Documents and Settings\\James\\Desktop\\compsci\\zelda sprites\\left walking1.bmp", mychar)


The error I get is in the Dansprite code again it higlights Pic.Free (picID) and says Illigal picture ID number "1". Any one got any ideas on this one?


Is this a vailed picture? and how many pics have u loaded in b4 this?.

-----------------------------------
Jonny Tight Lips
Tue Sep 28, 2004 6:54 pm


-----------------------------------
I got the first one working but not the second. I'm sure it is a vailed picture. And I don't think it I have any pics loaded I'm pritty sure that I freed all the tile picutres.  Got any other ideas? If you want I can attach the program I got so far? Well I'll keep trying.

-----------------------------------
Paul
Tue Sep 28, 2004 8:20 pm


-----------------------------------
lol some one censored D A N!  :o

who the hell is messing with it? type  L O L ... connected and see.


Sigh, tony is up to his tricks agane it looks like.


-----------------------------------
Dan
Wed Sep 29, 2004 3:11 pm


-----------------------------------
I got the first one working but not the second. I'm sure it is a vailed picture. And I don't think it I have any pics loaded I'm pritty sure that I freed all the tile picutres.  Got any other ideas? If you want I can attach the program I got so far? Well I'll keep trying.

ataching it with a copy of the verson of dansprites you are using whould be helpfull. as well as a copy of the pic. you should zip it in to one file....

-----------------------------------
Jonny Tight Lips
Wed Sep 29, 2004 5:22 pm


-----------------------------------
Here it is.
Just run the one that says "RUN THIS ONE" its not all that complicated.

-----------------------------------
Jonny Tight Lips
Sat Oct 02, 2004 12:27 pm


-----------------------------------
Well... Anyone got any ideas? Since it says only one person has downloaded my program I'm assuming that no one has an answer but I have also tryed a differnt way just with Dansprite and a for loop that changes the pic and it still doesn't work :?  Does anyone have like a sample program that usues DanSprite.changePic?? If you do plz post it or give me a link to where I can look at it beacuse I am out of ideas on how to fix this.

-----------------------------------
Dan
Tue Oct 05, 2004 5:27 pm


-----------------------------------
ya i dled it, just to busy with mid tremms to look at it  :roll: 

I will soon, may be....

-----------------------------------
Jonny Tight Lips
Tue Oct 05, 2004 6:12 pm


-----------------------------------
Why thank you Dan, for crushinf my hopes and deams! :cry: well you can't be the only one that has ever used Dansprites.ChangePic... or are you? I've try using it is several other codes also. Since my other code was a lil messed up anyway and had a lot of extra crap that didn't need to be there here is a very simple one that has the same problem. It mgiht make it eayer for those busy ppl to look at it faster :lol:

-----------------------------------
Dan
Tue Oct 05, 2004 8:54 pm


-----------------------------------
well you can't be the only one that has ever used Dansprites.ChangePic... 

Yes, yes i very well cloud. Another good posiblity is that i may have never tested that fuction at all and it could just be a random pile of code....

-----------------------------------
Jonny Tight Lips
Wed Oct 06, 2004 11:33 am


-----------------------------------
OMG! :shock:  you've got to be kidding me!!! DAM IT!! Now I'm going to have to figure out how to fix that... altho I could just be the one making the mistake, and man do I hope so. SO has anyone else ever used DanSprites.changePic? becasue if no one has and it is a problem with Dan Sprites I should get working on it but If its me that is wrong then its all good. 

Hmmm also is there a way to use like a Pic.Free functrion in DanSprites or no?

-----------------------------------
Jonny Tight Lips
Wed Oct 06, 2004 12:01 pm


-----------------------------------
I AM SO SMART S-M-R-T!!!! I FIXED IT  :lol: !!! YAY!!!!!!!! Well anyways the problem was in the accual DanSPrite file (haha wasn't my fault) that it said Pic.Free (picID) when it should have said Pic.Free (pic (picID)). it is on line 210. yay I'm so happy but come on Dan you should have at least tested it b4 you start giving it out. :lol: Well I think that this is a job well done. Thanx for your help anyway. And DanSprites ROCK!!!!!!

-----------------------------------
Dan
Wed Oct 06, 2004 1:18 pm


-----------------------------------
should of, could of, did't.

any how post the fixed verson of danSprites and i will post it with creit to you for fixing the "bug"

-----------------------------------
Jonny Tight Lips
Wed Oct 06, 2004 2:59 pm


-----------------------------------
Here it is, just so you know I also fix the spelling error on the procedure it used to say DnaSprite.chagePic so I fix it to DanSprite.changePic, that one had me confused for a while :D
