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 / Silly "Array does not exist/subscript out of bounds" error involving dwords

Author
Message
Aralox
19
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 20th Jul 2010 09:55 Edited at: 20th Jul 2010 09:57
Hey there,
this is the code:


which just WONT work. it just baffles me. Im sure there will be posts saying that it works fine for you guys - which leads me to think that it has something to do with my version of darkbasic. I installed the latest update, but since i had lots of troubles with that, i reinstalled the previous update (without uninstalling darkbasic first).

But heres the stupid part: this

works fine. Im posting here as a last straw, because i understand this problem seems absolutely nonsensical. Is it something to do with how dbp stores memory with the variable?

Anyways, i attached the project and sources for this.

Thanks, and really hoping for a fix. im at my wits end
Aralox


EDIT: I tried putting the #constant in front for the first example, but it still doesnt work (this doesnt work:
)

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Jul 2010 11:46 Edited at: 20th Jul 2010 11:51
Why should it work? What is &1 supposed to be?

The error message is bizarre though and looks like a bug.

Edit

The following simpler code gives the same runtime error.

Aralox
19
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 20th Jul 2010 12:05
Omg, thank you so much green gandalf, you are my hero forever.
I cant believe it, im blind - i used & instead of %. my god. wow
i love you,
Aralox

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Jul 2010 16:26
Steady on ...

There's no limit to the surprises computers spring on us when we make simple typos. For some reason it's easy to spot other people's typos, but not one's own.

Login to post a reply

Server time is: 2026-07-25 07:54:37
Your offset time is: 2026-07-25 07:54:37