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.

Author
Message
Drac X
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 10th Sep 2003 03:01
I'm trying to create a vector type in db classic. It looks like it's right to me. I know... I know... they aren't realy types and all that. I've read, I know people think they suck, and I've decided to try to use them anyway.

So now that we are in agreement that what I'm doing is probably not popular...

Can someone take a look at this and tell me where I went wrong? I get an error @ dimtype vector,v.

Drac - X
_________________
Excerpt from 'A Day in the Life of Some Guy' ©2003
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Sep 2003 07:21 Edited at: 10th Sep 2003 07:23
Type Vector
X#,Y#,Z#
EndType

firstly you have to declare these as a float or string or integer

eg:

X# as float etc...



Function vMake_Vector(x#,y#,z#)
DimType Vector,v
v.X# = x#
v.Y# = y#
v.Z# = z#
EndFunction v


this array created in this function is local to thie function only
to create it as a typed array you need to use a line just under your type declaration

eg:

dim MOON(3) as MOON

then you may need to fill the data here or later on.

eg:

MOON(1).NUM = 1
MOON(1).NAME = "Havendoor"
MOON(1).ALIGNMENT = 1
MOON(1).ROTATION = 1





btw types only work in DBC with an alternative editor called DARKEDIT, it however cascades the types back into arrays for final usage and compiling.

DBP has native type access

http://www.lunarpixel.com
It's already tomorrow in Australia

Login to post a reply

Server time is: 2025-05-20 04:29:13
Your offset time is: 2025-05-20 04:29:13