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 / What are the limitations of dark basic pro?

Author
Message
Daniel wright 2311
User Banned
Posted: 16th Oct 2011 05:17 Edited at: 16th Oct 2011 05:20
I had 8 game guys in game and everything worked fine, then I used the same code doing nothing but added more guys,dbp gave me fake errors that where not there when I added 30 objects, but with only 8 every thing works fine,why is this?

my signature keeps being erased by a mod So this is my new signature.
Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 16th Oct 2011 05:50
we need some source code or at least the error message to have any hope of helping you.

Please provide more information so people can help.

Sometimes I like to use words out of contents
Daniel wright 2311
User Banned
Posted: 16th Oct 2011 06:23
Im not asking for help realy,Im asking if any one else has had any errors when they try to add 30 diffrent enemies at one time. I had no errors in any of my code,none,it was the same code as if I just had the same 8 objects in game.

my signature keeps being erased by a mod So this is my new signature.
Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 16th Oct 2011 06:45
I get no errors from loading 30 different models.

Sometimes I like to use words out of contents
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 16th Oct 2011 12:06
I load in up to 400 models at a time in my game, no problems.

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 16th Oct 2011 13:14
Daniel change your style, what is... "that" ?

Do you speak in life like that as well? Be specific, and write like a thinking being.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 16th Oct 2011 14:35 Edited at: 16th Oct 2011 14:47
Why would we all be using DBPRO for all these years it if causes errors after loading 30 objects?

The problem can be solved by finding the source of it; you will find the source of the problem by testing and timing parts of your code that cause the error. We can give you a hand if you post the code so we can see the problem.

EdzUp
23
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 16th Oct 2011 18:13
I think its only limitation that I can perceive is quite simply that its Windows only.

-EdzUp
Graveyard Dogs
Daniel wright 2311
User Banned
Posted: 16th Oct 2011 20:29 Edited at: 16th Oct 2011 20:32
30 enemies with the same code is what I ment, all of them in the same leval, its odd is all, there was no error in any of my code and my program was giving me fake errors.

This made me wonder is all,this is why I posted this. All I did was change my enemy count from 8 to 30 then all the fake errors came in. Like with just 8 enemies my array name was not a illegal number,but when I put the number to 30 enemies My program said the same arrays name was an illegal number,but it was not.Then I changed the number back to 8 and then it was not a illegal number. I changed all my number count in my array and even added them to the array actions.

I checked all my code over and over and still there was no error,but it was giving me fake errors so the program would not run, And this is why I am asking if anyone has ever been in the same situation.

my signature keeps being erased by a mod So this is my new signature.
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 16th Oct 2011 21:49
Quote: "30 enemies with the same code is what I ment, all of them in the same leval, its odd is all, there was no error in any of my code and my program was giving me fake errors."

I think the conclusion you should reach is that there IS an error in your code that you haven't found yet.

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th Oct 2011 22:51
Yep, your array is setup to handle 8 enemies, so when you want 30 you need to setup your array to handle that many too as well as your code.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Daniel wright 2311
User Banned
Posted: 16th Oct 2011 22:59
Quote: "Yep, your array is setup to handle 8 enemies, so when you want 30 you need to setup your array to handle that many too as well as your code."


I did, I even added all of the new object numbers to every thing else in the array,I even changed the array object number to 30. This was my point my friend in the first post, It does not make sence at all. There was no error in my code as it was the same code I used when I only 8 guys,but it was giving errors that where not there.

my signature keeps being erased by a mod So this is my new signature.
SH4773R
16
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 16th Oct 2011 23:08
Quote: "array object number"


??

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Oct 2011 23:16
I think you're all going round in circles here.

@Daniel,
Post code, or it didn't happen

Seriously, you're asking for debugging help without any code being provided - none of us are psychic, so we don't know what you've coded, and can't tell you what (under all probability) you've done wrong.

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 16th Oct 2011 23:20 Edited at: 16th Oct 2011 23:22
Quote: "arrays name was an illegal number"


Array name with illegal number

Hmm

You changed "enemy count" from 8 to 30 and it crashed.

The error you receive is "array name was illegal number" or did it say "index out of bounds"?

Did you declare the array as something like:

?

Does the error message show a line number? (The problem may not even be on that line)

As Ian says, put some code up!

Daniel wright 2311
User Banned
Posted: 16th Oct 2011 23:22 Edited at: 16th Oct 2011 23:27
The only thing I did diffrent was this,let me show you


from this


to this


then It gave me an error at line 256 that I had an illegal number

EDIT: And this is the name that was illegal,but it was not
enemy(e).estates

my signature keeps being erased by a mod So this is my new signature.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 16th Oct 2011 23:23
Daniel wright 2311
User Banned
Posted: 16th Oct 2011 23:33
Well,Mabey somehow it was my pc just acting up but I am shure there was no error unless the last post I posted there is an error I do not see it.

Remember guys, I just started to understand arrays,I am no master at them yet.

my signature keeps being erased by a mod So this is my new signature.
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 16th Oct 2011 23:38
From a quick look at your example, it seems you could use something like this to initialize Enemy 4 through to 30.



Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 16th Oct 2011 23:40
The word 'Illegal' does not show up on error messages for array indexes out of range. (At least on my installation)

The word Illegal shows up for object numbers that are set as zero; like:

i = 0 : move object i, 10

What else is on this line enemy(e).estates

enemy(e).estates = 0

or

load object "file.x", enemy(e).estates

or something?

Daniel wright 2311
User Banned
Posted: 16th Oct 2011 23:44
this is the whole line wich is nothing more then object collition

if F#<430.0 and OBJECT COLLISION(enemy(e).estates,player(1).pstate)=1

@Kevin Picone

thanks,ill do that now

my signature keeps being erased by a mod So this is my new signature.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 16th Oct 2011 23:51
One of those object Ids are invalid my friend. It is not the array, it is the object Id that caused the problem; otherwise the error would have said the "index is out of bounds", but instead it says the object has "an illegal number".

This is what you should post up when ever seeking help; all of the code, or the part that causes the problem; and the exact error message.

Daniel wright 2311
User Banned
Posted: 16th Oct 2011 23:58
If the object number is the cause them I am at a loss with it, all of the objects where loaded and numbered,But I am trying something else now to see what happens,I am adding one at a time to see if it still happens to see what object number it is.

my signature keeps being erased by a mod So this is my new signature.
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 17th Oct 2011 01:01
Quote: "Dim enemy(30)as enemies"
Am I the only one that sees a problem here?
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 17th Oct 2011 01:17
That line does not cause an error RC.

Daniel wright 2311
User Banned
Posted: 17th Oct 2011 01:24
Quote: "Am I the only one that sees a problem here? "


Putting the array number to 30 would not cause this error,it has to do with something with another object number,Im guessing its to do with a object that is not in the array but im not shure just yet.

my signature keeps being erased by a mod So this is my new signature.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Oct 2011 01:53 Edited at: 17th Oct 2011 01:53
Quote: "Am I the only one that sees a problem here?"


It just looks weird without the space after the ) but it works... or do you mean the lack of a UDT? It's probably there he just didn't show it to us.

Daniel, do you delete the objects and clear the elements in the array? That would cause what Chris mentioned... object number zero.

Daniel wright 2311
User Banned
Posted: 17th Oct 2011 02:02


Im not deleting anything,Thanks though, I shortened my array and this helped alot,I belive it was this but im not shure, When I find out Ill repost. Tonight Im going to put in 30 guys with the shortend array to see what happens.

my signature keeps being erased by a mod So this is my new signature.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 17th Oct 2011 04:01 Edited at: 17th Oct 2011 04:02
Chris is right, you won't get an illegal reference with an array segment. That happens when you reference an asset number as zero.

Why don't you just try something like this:



Then run the program. If the object collision doesn't work, then you know that either enemy(e).estates = 0 or player(1).pstate = 0 and then you can search to find where it is causing the array segment to be empty...

Seems simple enough to me. Good ol' fashioned user debugging. People never seem willing to do it these days...

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 17th Oct 2011 15:51
I was just surprised to see that actually compiles without the space, I wasn't talking about the "30" at all..
bass player
17
Years of Service
User Offline
Joined: 11th Nov 2008
Location:
Posted: 17th Oct 2011 16:56
Try running the Blista Diagnostic Sytem on your code.. It shows arrays and variables in real time as the code runs. get the BlistaDark trial version ( its free ) from Blista.co.uk.

Login to post a reply

Server time is: 2026-07-11 09:49:27
Your offset time is: 2026-07-11 09:49:27