Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / I know you all hate this code

Author
Message
DivW
22
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 22nd Sep 2003 18:36
I know everyone must be hating my code abilities by now. But i tried converting my code for handling 100 baddies (not all at once) so i put in 3 arrays, ONe for the bad guy sprite number, one for the bad guy y position, and one for the bad guy x position. So i took a good bit of time and looked through, fixed a couple 'ha error messagaes, and then i got this strange parameter mismatch one. Hmm i thought: wonder what this means.Those parameters look fine to me. So i skimmed my code for other errors, and eventually figured out that i don't really know what the blazes i'm looking for. I was searching for something i'd done wrong, a space in the wrong place, but i can't find one. So if anyone's feeling REALLY patient, then you can try out my code and see if you can help e with it now. By the way, this is my Ad. Higher Computing project, and i'm a newb. So that's why i'm a) desperate to get this working and b) such a dumbass with dark basic pro. Anyway anyone who can hear my plea: help! help me please!

-DivW

PS: Thanks for all ur help so far, ur a great community.

Your soul...it tastes like chicken
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 22nd Sep 2003 18:40
posting the code might help?

-RUST-
DivW
22
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 22nd Sep 2003 18:49
Whoops.

Your soul...it tastes like chicken
DivW
22
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 22nd Sep 2003 18:50
Hee hee. I'm always making mistakes like that. Just forgot that's all...i'm not really an eejit.

Your soul...it tastes like chicken
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Sep 2003 19:09
Line 226:

If Sprite exist BadguyNumber = 1

should read:

If Sprite exist(BadguyNumber) = 1

and that does it for me, compiles perfectly!

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 22nd Sep 2003 21:14
I HATE your code!!! just kidding...

I usually find it easier to make everything into a function though. Like where you have "shooting function" have that be a function.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Sep 2003 21:51
This won't make a difference really, but I find it easier to work with. Instead of having 3 seperate arrays, just make a 2 dimensional array. youArray(100,3)

youArray(1,1) = sprite number
youArray(1,2) = X pos
youArray(1,3) = Y pos
Andrew
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: United Kindom (what makes it important?)
Posted: 22nd Sep 2003 22:09
I didn't quite think that the code is in the correct order LOL

I know my codes - i am now more advanced with DBP-
Ask me any question (um not to do with online though :0)
DivW
22
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 22nd Sep 2003 22:25
Yeah, i'm still messing aroung with the code right now. I'm not quite sure where everything goes but i'm working it to make sure the data that needs compiled for the other equations goes before them in the code. Functions? Havn't come across them yet. Anyone got a sec to explain them to me? 2 Dimentional arrays? Thought about them. They seemed very complicated, but i'll experiment with them, you're probable right. Thanks BatVink i guessed it would be something small. Well i'll keep you posted, there is a %120 chance i'll mess this up again, so keep ur eyes peeled. thanks!

Your soul...it tastes like chicken
Andrew
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: United Kindom (what makes it important?)
Posted: 22nd Sep 2003 22:54
Do you just need to know where to place the codes? if so this will be very long so check out the tutorials you got

I know my codes - i am now more advanced with DBP-
Ask me any question (um not to do with online though :0)
DivW
22
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 23rd Sep 2003 00:55
No, i can do the code. Thanxs peeps i tested the code and it works again! YAY! So i'll do everything i can to keep this code off the boards for a while, but let's face it it's gonna break again lol thanks peeps see ya all soon.

Your soul...it tastes like chicken
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 23rd Sep 2003 01:16
@Andrew: CODES????

CODE!

(kinda like deer, you don't say deers, do you?)
LOL


-RUST-
zzabb
23
Years of Service
User Offline
Joined: 25th Apr 2003
Location: Seattle, USA
Posted: 23rd Sep 2003 01:27
one thought
there are some good posts about arrays in the newbee section
it will teach ya the codeS just right (-: (-: (-: (ok i'm awful)

My advice is free -
unfortunately you get what you pay for (-:
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Sep 2003 01:42
Somebody said CODES!

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
DivW
22
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 25th Sep 2003 11:31
I got it working again...ignore the baddie problems i can fix that myself. What i'm worried about is the speed. It has a framrate of 81, apparently-but moves really slow, it flamin crawls. Something's wrong in the code, methinks... - DivW

1200 Athlon
GeForce 4 MX440
256 RAM
WINDOWS XP PRO
DARK BASIC PRO

Your soul...it tastes like chicken

Login to post a reply

Server time is: 2026-07-25 07:01:45
Your offset time is: 2026-07-25 07:01:45