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 / C2475 Compile Erorr

Author
Message
zao420
19
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 7th Mar 2005 05:02
he everyone.

in my on going atempt to learn c++ and all the problems i am running into. i ran into one i have no clue how to fix and can't find any good info with google.

There Error is


the line it gets the error is Player[0].Obj = Hero.ObjNumber; and the part i add to the frame wrok sdk thing ian made is
maybe ia m doing it wrong there. it all works fine untill i try to assign the number to a varible, i can print it the dbtext.

any one know how i can fix this.

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
billy the kid
18
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 7th Mar 2005 05:13
I think you need to make:

Player[0].Obj = Hero.ObjNumber;

into

Player[0].Obj = Hero.ObjNumber();
zao420
19
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 7th Mar 2005 05:17
your right can't beleive i forgot that. thanks for the help.

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Mar 2005 21:27
SDK? It's just an example of an OO wrapper for the existing number-based system really.

The idea of these wrappers was to remove the need to use object numbers, and to switch to a completely OO interface to the DarkSDK. I wrote it to show how to provide a simple OO layer to the DarkSDK so that it can be changed easily in future when the DarkSDK uses pointers instead of or as well as object numbers.

You might want to look again at what you are doing to see if you can do it without exposing the object numbers in your code.

If you let us know here what you need the object number for, maybe some of us can come up with an alternative that doesn't use the object number directly.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
zao420
19
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 8th Mar 2005 08:40
hey Ianm the reseaon i need the object number is because i am just learning c++ as you know, and i am reading thinking in c++, but well i am learning it i want to play with dark game sdk, and some of my colision code needs the object number, aswell as other parts of my code. i am in the process of making my player and npc code into oop aswell but for now i will need the object number for that aswell.

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Mar 2005 20:23
I'll see if I can come up with a simple way to handle collisions for you - it shouldn't be too difficult. If you can also tell me specifically what alse you need the object number for, I'll think about that too

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
zao420
19
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 9th Mar 2005 08:21
mostly only collision i am going to be writing the class for the player and npc. so i won't need it for those after that. and thats the only other thing i was using the object number for.

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Mar 2005 03:45
I'd forgotten all about this ... again

I've just thrown together my solution to your collision problem - let me know how well it fits your problem.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Attachments

Login to view attachments
zao420
19
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 30th Mar 2005 12:44
Thanks Ianm that looks good was going to reply sooner but i been busy with life. now all i need to do is get my sliding collision working with that now.

a problem i am having though is getting my player class to work right. i have


but when i call

i get an error


is it possible to inherit from the same class twice?

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Mar 2005 21:41
It's a typo - Your constructor in the LoadPlayer class has incorrect case for the 'L' in player : LoadPLayer

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2023-02-02 15:26:17
Your offset time is: 2023-02-02 15:26:17