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.

Dark GDK / Need of conversion from DB Pro to DarkGDK

Author
Message
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 11th Mar 2009 08:38 Edited at: 11th Mar 2009 09:16
Can someone convert this DB Pro code into DarkGDK code for me? I've tried but I'm Terrible at it:

silenus
15
Years of Service
User Offline
Joined: 4th Mar 2009
Location:
Posted: 11th Mar 2009 11:54
when you can tell me what "#" means, I can translate you the code.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 11th Mar 2009 12:08
i think it just means variable, most of them(if not all) and ints BTW.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 11th Mar 2009 12:20
You think? So you don't even know what the code does? Copy/pasting code generally doesn't work in programming.

tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 11th Mar 2009 12:23
well dbpro doesnt have types so i wouldnt really know, i know what it does also, just dont know the DarkGDK equivilant.
The Real Abaddon
16
Years of Service
User Offline
Joined: 26th Jun 2008
Location:
Posted: 11th Mar 2009 12:27
# in dbp stands for the variable float in c++

so if you have #xy you write in c++ float xy, but be careful not to declare the same variable twice, it's best to declare all variables first at the top of the file.
silenus
15
Years of Service
User Offline
Joined: 4th Mar 2009
Location:
Posted: 11th Mar 2009 12:31


the variables should be float
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 11th Mar 2009 12:35
Quote: "well dbpro doesnt have types so i wouldnt really know"


What do you mean by types? DBP has UDTs.

Quote: "i know what it does also"


Well you said # indicates it's a variable which isn't the case, so you don't.

There's no point in us porting generic code like this for you as it shows you don't know C++, if it was something difficult then I could understand.

Quote: "it's best to declare all variables first at the top of the file"


If you want messy code, yes.

Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 11th Mar 2009 12:36
To the noob:

# = float in DBPro




Wrote it as it own method/function.

Keep it simple.
Questions? Mail me
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 11th Mar 2009 12:37
@silenus

Playercontrol:

Is a subroutine(or whatever, dont remember atm) in DBPro ;- )

Keep it simple.
Questions? Mail me
silenus
15
Years of Service
User Offline
Joined: 4th Mar 2009
Location:
Posted: 11th Mar 2009 12:39
@Hayer

thanks
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 11th Mar 2009 12:40
Thanks guys.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 11th Mar 2009 12:42 Edited at: 11th Mar 2009 12:44
A couple of things:

1. For single line 'if' statements you do not need brackets.

2. You specified all of the values as double floats, when they only need to be floats (add an f to the end of the value, like 1.0f).

3. A little bit of indentation wouldn't go amiss.

Login to post a reply

Server time is: 2024-11-25 17:38:30
Your offset time is: 2024-11-25 17:38:30