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 Discussion / Load array command problems

Author
Message
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 14th Aug 2007 20:55
i have been working on software for a new file type i have made(.bief), and i was working and a program that will convert it into a bitmap, but when i try to load it into an array i get an error message that says array name not valid HELP!!!!!!!

The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 14th Aug 2007 21:03 Edited at: 14th Aug 2007 21:04
hmm... i don't work with arrays often but post your code and i will see if i can help.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Aug 2007 21:18
I think you need to use the same dimensions or something.
dunno, but I remember arrays being very picky.

Your signature has been erased by a mod because it was rubbish.
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 14th Aug 2007 21:23
the problem is that it works with one dementional arrays that are numbers, not variables, but since the pictures are of various sizes, i
use 2 variables. here is my code so far.



The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Aug 2007 21:38 Edited at: 14th Aug 2007 21:42
Quote: " it works with one dementional arrays"

You have demented arrays?

When I edit this it will be more helpful

[edit]
I think the problem is that you declare the "pic" array then try to load an array with the same name. remove the DIM statement and try it

Your signature has been erased by a mod because it was rubbish.
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 14th Aug 2007 21:51
i tried that and it gives me the "No such array dementionalised" error.

The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.
Lee Stevens
18
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Deep in code...
Posted: 15th Aug 2007 12:15
have you put the name of the file in the code

SPECIAL OFFER ON MY WEBSITE
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 15th Aug 2007 18:19 Edited at: 15th Aug 2007 18:40
yes (gulp) But only as a variable so that the user can specify what bief they want to convert

The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 15th Aug 2007 18:40 Edited at: 15th Aug 2007 18:41
Would the type of file affect it?

The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 16th Aug 2007 23:06
No ideas?

The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 16th Aug 2007 23:28
nope.....yeah i think the file format would affect it!!
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 16th Aug 2007 23:53
drat, so loading a .bief file instead of a .txt file would return an error

The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 17th Aug 2007 02:37
When saving orloading the array, even though you create it with 2 or more dimesnions, only use one dimension when saving or loading it. I believe the save and load array commands only look at the name and the first dimension as a reference to array.

The file extension shouldn't matter.



Enjoy your day.
Kabong
18
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 17th Aug 2007 15:03
I concur. I believe Latch has the correct solution.

I'd add more than that but I'd just sound like I'm tagging on.
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 17th Aug 2007 20:01
tyvvma!!!!!

(Y=M*X+B)=(X=(Y-B)/M)=(B=Y-M*X)=(M=Y-B/X)
and if you can figure out what it means i will give you a cookie.

Login to post a reply

Server time is: 2025-05-30 13:46:01
Your offset time is: 2025-05-30 13:46:01