|
'ph_setgravity' undeclared identifier??!?!?
#365736
03/28/11 21:24
03/28/11 21:24
|
Joined: Apr 2007
Posts: 125 Brazil - São Paulo
Ericmor
OP
Member
|
OP
Member
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
|
As i purchased A8 full and runned trought the Lite-C tutorials, when i reached lesson 119 and played the SCRIPT19.C, the engine crashed, showing the following message:
... error in line 18: 'ph_setgravity' undeclared identifier <ph_setgravity (vector(0, 0, -386)); // set the gravity> ..0.065 sec ...
At first, i tought it was something to do with the tutorial, but after reading it, it wasn´t the case. Trying to fix it, i added in the includes section of the code:
#include <ackphysx.h>
...thinking that this might be a problem related to the version of the script when it was made or something... no dice, same problem. Strangely, searching the forum produced NO results, so i might be the only one having this problem? Is there something in the GPU driver that can cause this? Or the official A8 tutorial is buggy? Any help is appreciated.
|
|
|
Re: 'ph_setgravity' undeclared identifier??!?!?
[Re: Ericmor]
#365739
03/28/11 21:30
03/28/11 21:30
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
I think the tutorials are still based on A7.
Look up "pX_setgravity" in the manual. It's the PhysX version of what you need.
Jibb
EDIT: ninja'd
Last edited by JulzMighty; 03/28/11 21:31.
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: 'ph_setgravity' undeclared identifier??!?!?
[Re: Ericmor]
#365744
03/28/11 21:47
03/28/11 21:47
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
From where are you reading the tutorials? If you read them online they're up-to-date.
Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: 'ph_setgravity' undeclared identifier??!?!?
[Re: Ericmor]
#365745
03/28/11 21:49
03/28/11 21:49
|
Joined: Apr 2007
Posts: 125 Brazil - São Paulo
Ericmor
OP
Member
|
OP
Member
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
|
This is the crap they´re feeding in this tutorial: function main() { level_load("roller.wmb"); // load the level ball = ent_create ("ball.mdl", vector(-400, 0, 100), NULL); // create the ball ph_setgravity (vector(0, 0, -386)); // set the gravity phent_settype (ball, PH_RIGID, PH_SPHERE); // set the physics entity type phent_setmass (ball, 3, PH_SPHERE); // and its mass phent_setfriction (ball, 80); // set the friction phent_setdamping (ball, 40, 40); // set the damping phent_setelasticity (ball, 50, 20); // set the elasticity while (1) { ball_force.x = 150 * time_step * (key_cur - key_cul); // move the ball using the cursor keys ball_force.y = 150 * time_step * (key_cuu - key_cud); // 25 sets the x / y movement speeds ball_force.z = 0; // no need to move on the vertical axis phent_addtorqueglobal (ball, ball_force); // add a torque (an angular force) to the ball camera.x = ball.x - 300; // keep the camera 300 quants behind the ball camera.y = ball.y; // using the same y with the ball camera.z = 1000; // and place it at z = 1000 quants camera.tilt = -60; // make it look downwards wait (1); } }
After running around trying to fix it, i discovered that ALL SYNTAXES ARE WRONG, and this code won´t run at all unless after a complete re-write. I tought i would delay my hedaches with syntax related problems for later, when i would be forced to re-write thousand of code lines from my old scripts because of version changes, but i´m deeply surprised to have to re-write a frigging PHISIC-X TUTORIAL.
|
|
|
Re: 'ph_setgravity' undeclared identifier??!?!?
[Re: JibbSmart]
#365748
03/28/11 21:52
03/28/11 21:52
|
Joined: Apr 2007
Posts: 125 Brazil - São Paulo
Ericmor
OP
Member
|
OP
Member
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
|
From where are you reading the tutorials? If you read them online they're up-to-date.
Jibb I acctually downloaded them from the main page, after receiving my key. Well, i´ll look after the online version them, thanks.
|
|
|
Re: 'ph_setgravity' undeclared identifier??!?!?
[Re: Ericmor]
#365749
03/28/11 21:56
03/28/11 21:56
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Okay, that is indeed bad on their part, but a simple mistake -- if you click on "Lite-C Workshops" instead of "English" it opens the online version. You should probably let Conitec know in "Ask the Developers" or "Blame the Manual" that the download link is old  I'm sure they'll fix it quickly. Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|