Posted: Sat Sep 25, 2004 11:31 pm Post subject: 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.
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
Sponsor Sponsor
Jonny Tight Lips
Posted: Sun Sep 26, 2004 12:08 am Post subject: (No subject)
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?
Fire_Storm
Posted: Sun Sep 26, 2004 10:57 am Post subject: (No subject)
good work on stealing my code
SuperGenius
Posted: Sun Sep 26, 2004 6:24 pm Post subject: (No subject)
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
Posted: Sun Sep 26, 2004 9:26 pm Post subject: (No subject)
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
Posted: Sun Sep 26, 2004 10:13 pm Post subject: (No subject)
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 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
Posted: Mon Sep 27, 2004 4:41 pm Post subject: (No subject)
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
Posted: Mon Sep 27, 2004 7:35 pm Post subject: (No subject)
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
Sponsor Sponsor
Dan
Posted: Tue Sep 28, 2004 3:16 pm Post subject: Re: troubles with DanSprites
Jonny Tight Lips wrote:
well I'm trying to use DanSprites and I keep getting an error in the accualy DanSprites code. Well her is my code.
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" ?
Quote:
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?.
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Jonny Tight Lips
Posted: Tue Sep 28, 2004 6:54 pm Post subject: (No subject)
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
Posted: Tue Sep 28, 2004 8:20 pm Post subject: (No subject)
lol some one censored D A N!
who the hell is messing with it? type L O L ... connected and see.
[mod:e9a1325ccf="Hacker Dan"]
Sigh, tony is up to his tricks agane it looks like.
[/mod:e9a1325ccf]
Dan
Posted: Wed Sep 29, 2004 3:11 pm Post subject: (No subject)
Jonny Tight Lips wrote:
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....
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Jonny Tight Lips
Posted: Wed Sep 29, 2004 5:22 pm Post subject: (No subject)
Here it is.
Just run the one that says "RUN THIS ONE" its not all that complicated.
Jonny Tight Lips
Posted: Sat Oct 02, 2004 12:27 pm Post subject: (No subject)
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
Posted: Tue Oct 05, 2004 5:27 pm Post subject: (No subject)
ya i dled it, just to busy with mid tremms to look at it
I will soon, may be....
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!