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 / _import causing crash?

Author
Message
Mugen Wizardry
User Banned
Posted: 21st May 2010 20:20 Edited at: 21st May 2010 20:20
why is this crashing?



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 21st May 2010 20:36
Quote: "if keystate(23)
gosub _import
ndif"


'ndif' should be 'endif'.

Does that fix it?

Cheers

Slayer rules!!! Yeaaah, man!
Mugen Wizardry
User Banned
Posted: 21st May 2010 21:09 Edited at: 21st May 2010 21:09
sadly no.

now it's not even OPENING my import file.

here's the whole code:

http://pastebin.com/ztcRP14j

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 21st May 2010 21:16 Edited at: 21st May 2010 21:18
Your code is full with error, i`m not counting the issue with "ndif" pointed by The Slayer.

Dbpro couldn`t understand this line:

because you left no space between "turn camera left" and "(keystate(30)-keystate(32))*1"


this line is expected to be like:
if keystate(23) = 1 or if keystate(23) = 0

Keys have two states: 0 - not pressed, 1 - pressed
IDK why dbpro did not point at this error.



should be :

read float 10,scale#

else there is error that parameter is not correct.



the above line have incorect parameters also.

It should be something like this for example:


There is finally 1 uneeded "endif", just before return, which is line 33.I`m pretty sure it`s something copyied by mystake.

...

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Mugen Wizardry
User Banned
Posted: 21st May 2010 21:20
not neccessarily, luskos.

i used a dim for filename$()

and i used a dim for

#scale()

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 21st May 2010 21:26
Ok, scratch them from the list.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Mugen Wizardry
User Banned
Posted: 21st May 2010 21:28
but i need to use these.

the problem is

its not reading OR loading the import file

...

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 22nd May 2010 02:53
it's not even compiling ._.
Mugen Wizardry
User Banned
Posted: 22nd May 2010 04:50
because you need BBBGUI

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd May 2010 09:33
Quote: "this line is expected to be like:
if keystate(23) = 1 or if keystate(23) = 0

Keys have two states: 0 - not pressed, 1 - pressed
IDK why dbpro did not point at this error."

That is incorrect. As it returns a boolean, you don't need to explicitly put the =0 or =1 on the end. You can indeed just do 'if Keystate(23)' and it will work correctly.

Quote: "IDK why dbpro did not point at this error."

Cos it isn't an error.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 22nd May 2010 15:43
ok, so why isnt this thing loading _import?....

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd May 2010 16:04
Because you don't open the file.

you close it 3 lines from bottom, but you don't open it after you enter the gosub.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 22nd May 2010 16:17
still not working..



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd May 2010 17:35
Come on this is simple stuff... You haven't set filenum2 to anything! You need to assign it a number before you can open the file.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 22nd May 2010 18:14
well scuse me for not being here for 2 years.

Sheesh..

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 22nd May 2010 18:16
and yes i DID set it..



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd May 2010 22:46
Your OPEN TO READ statement is inside a for/next loop, but your CLOSE FILE is outside the loop - the second time the open statement runs, it will raise an error because the file is already open. The CLOSE FILE statement should be inside the loop, and in fact, just before the ELSE statement.

In future, please actually state the error you are getting. 'crashing' isn't very descriptive.

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 23rd May 2010 01:12
Why set file numbers of 3000001+ anyway? Surely file number of 1 is sufficient?

Quote: "well scuse me for not being here for 2 years."

Chill. You had a problem and I'm trying to help. Attitudes like that make me not want to.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 23rd May 2010 15:44
because i wanted to make sure
there arent any double file ids

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 23rd May 2010 17:48
so why won't it load now?...

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 25th May 2010 16:23
@mobiius: sorry.

i was having a bad day

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th May 2010 16:37
Quote: "i was having a bad day"

It happens to us all unfortunately.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 25th May 2010 17:12
yea. lol

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 25th May 2010 17:12
So do you know what's going on
w/ this code?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 25th May 2010 18:55
why won't import work?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th May 2010 19:10
Stop double posting.

My signature is NOT a moderator plaything! Stop changing it!
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 25th May 2010 21:16
Actually it`s 3ple posting and if you didn`t post he was gona make it quad post!

Where there is a will, there is a way.
I often edit my posts, that`s who i am

Login to post a reply

Server time is: 2026-07-26 01:26:17
Your offset time is: 2026-07-26 01:26:17