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 / unexpected end of file??

Author
Message
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 24th Sep 2010 04:08
I fixed most my errors, but I get this problem, whats up??


I want coke, not Pepsi!
Dodga
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 24th Sep 2010 04:20 Edited at: 24th Sep 2010 04:21
edit
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 24th Sep 2010 04:30
#ifndef _DARK_PHYSICS_H_
#define _DARK_PHYSICS_H_
#ifndef DARK_LIGHTS_H
#define DARK_LIGHTS_H
#ifndef DARK_AI_H
#define DARK_AI_H


you are using #ifndef without #endif's, use this:



by the way why did you add this code anyway? they look like some header guards for dark ai/lights/physics, why do you have them in you cpp file?

CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 24th Sep 2010 04:40 Edited at: 24th Sep 2010 04:42
My code doesn't work without the darkphysics one so I figured might as well do the lights and AI, how do I do shader? (if you know)
EDIT: I tried your code and got errors like before I even put it in, so I tried adding the endifs at the end of the code and now I have these 2 errors:
unresolved external symbol thing
unresolved externals

I want coke, not Pepsi!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 24th Sep 2010 05:12
what happens if you remove all the #ifndef-endif statements? if you are getting errors then it's a problem with physics (or maybe AI/lights/shader too), remove them and post the errors you get here

CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 24th Sep 2010 05:27
this is the errors:



And the code:


I want coke, not Pepsi!
Dodga
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 24th Sep 2010 05:33
Run the program in release mode and see if you get the same error.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 24th Sep 2010 05:44
it says image unavailable

i believe your problem is in linking with the libraries, i dont own physics/ai or lights, so ill tell you what to do:

First off, i think these physics/ai/lights/shader are just some header files (<name>.h) and static library files (<name>.lib), what you want to do is to include the .h files and link with the lib files, so they both need to be in reachable places for #include <> (for .h files) and #pragma comment ( lib, <name> ) (for .lib files), i guess you put all the .h files in the GDK directory/include, so put all the .lib files in the GDK director/lib/relese or whatever it is

now that they are reachable, link with them, with #include "DarkPhysics.h" you included the .h file, so use #pragma comment ( lib, "library name.lib" ) to link the library with your application, since i dont own these i dont know the names but i guess you should know them by now

so simply its:



change the names up there and it should be fine

hope that helps

CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 24th Sep 2010 08:05 Edited at: 24th Sep 2010 08:18
actually you got the names right haha. Anyway it works good now except for a dll error with my system, shou and what it's doing?
#pragma comment ( lib, "DarkPhysics.lib" )

EDIT: got dlls to work, pretty simple took like 5 minutes, had to download 2, anyway when I run my problem i colored the sphere green, everthing is brown with a slight hint of red in the shape of a sphere (around the edges) whats going on (after a while EVERYTHING starts to fall because of phy update, without it theres an error though, nonetheless the static box shouldn't fall and only the dynamic sphere should.)?
Pic (you can partially see the green sphere):



EDIT 2: I even tried coloring the ground (obj 2) and nothing, its still a brownish grey (see pic) but after a while because everything falling it starts to turn blue on the outsides.

THE CODE:


I want coke, not Pepsi!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 24th Sep 2010 11:31 Edited at: 24th Sep 2010 11:34
float x = dbObjectPositionX(1);
float y = dbObjectPositionY(1);
float z = dbObjectPositionZ(1);
dbPositionCamera(0,x,y-50,z);
dbRotateCamera(0,-90,0,0);

you positioned the camera 50 units below the ball, and made it point upwards, meaning that you should be only seeing the box, if not, you will see the sphere but you wont notice it moving

you can do something like: (before the loopGDK ( )



and box creation:
dbMakeObjectBox(2,1000,1,1000);
dbPositionObject(1,0,-1,0); //id = 1?
dbColorObject(2, RGB(140,15,75));

i believe you meant
dbPositionObject(2,0,-1,0);

CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 25th Sep 2010 05:11
thanks hassan but that doesnt help my major problem, I cant really test if im getting errors.

I want coke, not Pepsi!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 25th Sep 2010 09:12
remove dbAutoCamOff and see if there is any difference, also, post your new code to see what's wrong

CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 25th Sep 2010 09:58
my new code: something still isn't right... I can't see the green sphere or colored box... only blue and grey


I want coke, not Pepsi!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 25th Sep 2010 10:12
remove
dbPositionCamera(0,x,y+50,z);
dbRotateCamera(0,-90,0,0);
and you should be seeing something

CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 25th Sep 2010 10:21 Edited at: 25th Sep 2010 10:23
got it to follow the thing too (can't see it but whatever) but it goes right through the static object, phy update and declaring if they were dynamic or static in DBpro did the job, do you have physics hassan?


I want coke, not Pepsi!
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 26th Sep 2010 22:49 Edited at: 26th Sep 2010 23:03
Solved

I want coke, not Pepsi!

Login to post a reply

Server time is: 2024-07-02 08:45:12
Your offset time is: 2024-07-02 08:45:12