Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,787 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
'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 Offline OP
Member
Ericmor  Offline 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] #365737
03/28/11 21:29
03/28/11 21:29
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
it's changed to pX_setgravity


3333333333
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
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

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] #365742
03/28/11 21:40
03/28/11 21:40
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Thanks for the quick answer, folks.
So, Conitek releases a new version of Acknetix, modifies syntaxes all over again and forget to update the tutorials, thus creating a Lite-C that doesn´t work on the eyes of the begginers?
Those tutorials and the freaking manual NEED TO BE UPDATED TOGETHER WITH THE ENGINE!!!! Godamn, they need to put their act together!...

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
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

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 Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
This is the crap they´re feeding in this tutorial:

Quote:

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: Ericmor] #365746
03/28/11 21:50
03/28/11 21:50
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
http://www.conitec.net/litec/work19.htm

Like I asked: Where are you reading that?

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
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 Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Originally Posted By: JulzMighty
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
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

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 laugh I'm sure they'll fix it quickly.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: 'ph_setgravity' undeclared identifier??!?!? [Re: JibbSmart] #365750
03/28/11 22:00
03/28/11 22:00
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
I was almost forwarding an e-mail to support about this... lol, i need to lurk more in those forums laugh
So, it´s "Ask the developers" section then, thanks again Jibb!

Page 1 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1