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 / These subjects are not optional. Function question... or type maybe. I dunno.

Author
Message
Drac X
22
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 10th Sep 2003 17:38
Now I have to type all this crap in again.

First, I know that there needs to be changes to the way these functions handle results. I plan on making those changes, but I want to fix this problem first.

I'm getting this error:

User defined types must be of same type.

on the line that reads

v = vScalar(r#,va)

in vScalar(). I think it's clear from my code that both v and va are of the same type.


Can someone hook me up?

Thanks!

Drac - X
_________________
Excerpt from 'A Day in the Life of Some Guy' ©2003
empty
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Sep 2003 17:54
You can't return UDTs from functions.

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
Drac X
22
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 10th Sep 2003 18:04
ok... just for you, since you didn't read the whole post... I made some changes.

And boy, what a difference it makes. For clarification, these functions live in an include.

Now, on line three of my main source file (which has nothing, not even a comment on it), I get this error:

Parameter for 'vScalar' do not match 'float'



Is this what 'support for types' is?

Drac - X
_________________
Excerpt from 'A Day in the Life of Some Guy' ©2003
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Sep 2003 18:33 Edited at: 10th Sep 2003 18:38
I think you've found a rather nasty bug - aside from you defining vector and Vector, it seems to be having trouble passing in UDT's.

Believe it or not, change the r#, va as vector function parameters around - it will probably work then.




Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester

Login to post a reply

Server time is: 2026-07-25 08:12:27
Your offset time is: 2026-07-25 08:12:27