Game Development Community

Problem with a "phsyX resource

by CIMO · in Torque Game Engine · 09/20/2006 (11:04 am) · 27 replies

Compiling...
PhysXActor.cpp
../engine\physX/PhysXActor.h(39) : error C2065: 'pxMaterialData' : undeclared identifier
../engine\physX/PhysXActor.h(39) : error C2501: 'DECLARE_CONSOLETYPE' : missing storage-class or type specifiers
C:\Torque\SDK Giochi\Fast Shooter\engine\physX\PhysXActor.cpp(195) : error C2065: 'TypePhysXMaterialDataPtr' : undeclared identifier
PhysXJoint.cpp
../engine\physX/PhysXActor.h(39) : error C2065: 'pxMaterialData' : undeclared identifier
../engine\physX/PhysXActor.h(39) : error C2501: 'DECLARE_CONSOLETYPE' : missing storage-class or type specifiers
PhysXWorld.cpp
../engine\physX/PhysXActor.h(39) : error C2065: 'pxMaterialData' : undeclared identifier
../engine\physX/PhysXActor.h(39) : error C2501: 'DECLARE_CONSOLETYPE' : missing storage-class or type specifiers
Error executing cl.exe.

torqueDemo.exe - 7 error(s), 0 warning(s)

---

I have this problem when i compile the my engine....
How to resolve this problem?
Thanks =D
Page «Previous 1 2
#1
09/20/2006 (11:46 am)
I have this problem in consolle when i push the key in game for create a rock or box for test....

Mapping string: pxcrate to index: 4
starter.fps/server/scripts/physX/physXActorBox.cs (0): Register object failed for object (null) of class PhysXActor.
Mapping string: pxbox to index: 5
starter.fps/server/scripts/physX/physXActorBox.cs (62): Register object failed for object (null) of class PhysXActor.
Mapping string: pxsphere to index: 6
starter.fps/server/scripts/physX/physXActorSphere.cs (0): Register object failed for object (null) of class PhysXActor.

Please....Help me to resolve this problem THANKS
#2
09/21/2006 (3:41 am)
Please....Help me with this problem....
#3
09/21/2006 (9:15 am)
Please help me...i'm crazy to resolve this....help please
#4
09/21/2006 (1:32 pm)
OK.

First:
starter.fps/server/scripts/physX/physXActorBox.cs (0): Register object failed for object (null) of class PhysXActor.

That's what will be happening if your PhysX c++ file isn't compiling, but your project is linking and running without it. Fixing your other problem should fix this. Also, your C++ compiler should be set to fail on errors.

Second:
../engine\physX/PhysXActor.h(39)
This interferes with my sense of good karma. Please to be making your slashes all point the right way.

Thirdly:
Uh, I downloaded the resource I assume you're using. Line 39 of PhysXActor.h is this:
DECLARE_CONSOLETYPE(pxMaterialData)
and I *think*, looking quickly over the source, it should be:
DECLARE_CONSOLETYPE(PhysXMaterialData)

Gary (-;

PS Download ODEScript and try that :-D
#5
09/21/2006 (1:37 pm)
Oh thanks...But now remaing a only problem....this:

C:\Torque\SDK Giochi\Fast Shooter\engine\physX\PhysXActor.cpp(195) : error C2065: 'TypePhysXMaterialDataPtr' : undeclared identifier

Say to resolve this? THANKS very very thanks
#6
09/21/2006 (1:43 pm)
Looks like TypePhysXMaterialDataPtr should be just PhysXMaterialData. Not sure, though

Gary (-;
#7
09/21/2006 (1:51 pm)
C:\Torque\SDK Giochi\Fast Shooter\engine\physX\PhysXActor.cpp(195) : error C2275: 'PhysXMaterialData' : illegal use of this type as an expression
../engine\physX/PhysXActor.h(20) : see declaration of 'PhysXMaterialData'

this is a error....Why?

If i use this
ThypePhysXMaterialData

have this error:

C:\Torque\SDK Giochi\Fast Shooter\engine\physX\PhysXActor.cpp(195) : error C2065: 'ThypePhysXMaterialData' : undeclared identifier
#8
09/21/2006 (2:33 pm)
How resolve this?
#9
09/21/2006 (2:44 pm)
You have a simple typo.

Gary (-;
#10
09/22/2006 (2:50 am)
Sorry?...I have not understood i correct for resolve this problem in?
#11
09/22/2006 (3:59 am)
void PhysXActor::initPersistFields()
{
	Parent::initPersistFields();
	addField("MaterialBlock", TypePhysXMaterialData, Offset(mMaterialBlock, PhysXActor));
}

I have this and when i compile have this error:

C:\Torque\SDK Giochi\Fast Shooter\engine\physX\PhysXActor.cpp(195) : error C2065: 'TypePhysXMaterialData' : undeclared identifier

Uff....WHY!!!!
#12
09/22/2006 (6:40 am)
Never person have any idea?
#13
09/22/2006 (7:07 am)
Quote:
You have a simple typo.
Gary already gave you more than an idea.

Somewhere in your head code you most likely have a small simple typo. Like a missing {, or ; or whatever. Now, this typo is preventing a whole section of code compiling which is giving you your "undeclared identifier" errors. Read the error message your compiler is giving you and track down the problem.

Learn how to use your development tools before embarking on creating a game. This includes your compiler.

How do you expect to complete your game if you can't resolve a trivial compiling error?

If you choose not to learn your tools, then stop bothering us about it.

Sorry, but it had to be said.

Tim.
#14
09/22/2006 (7:23 am)
But this error take this:
void PhysXActor::initPersistFields()
{
	Parent::initPersistFields();
	---> addField("MaterialBlock", PhysXMaterialData, Offset(mMaterialBlock, PhysXActor));
}
whit this error:

C:\Torque\SDK Giochi\Fast Shooter\engine\physX\PhysXActor.cpp(195) : error C2275: 'PhysXMaterialData' : illegal use of this type as an expression
../engine\physX/PhysXActor.h(20) : see declaration of 'PhysXMaterialData'

and this in file .h
---> struct PhysXMaterialData : public SimDataBlock
{
	typedef SimDataBlock Parent;

	F32 pxRestitution;
	F32 pxStaticFriction;
	F32 pxDynamicFriction;

	U32 id;
public:
	DECLARE_CONOBJECT(PhysXMaterialData);
	PhysXMaterialData();
	~PhysXMaterialData();
	static void consoleInit();
	static void initPersistFields();
	bool preload(bool server, char errorBuffer[256]);
	virtual void packData(BitStream* stream);
	virtual void unpackData(BitStream* stream);
	bool updatePhysX(bool server);
};

DECLARE_CONSOLETYPE(PhysXMaterialData);
But i don't see the error.....sorry..But never it is born learned ....sorry for disturb......
#15
09/22/2006 (7:37 am)
I can't help you! I'm not using the PhysX resource. You probably haven't set up your include directories correctly or you're trying to implement the resource into 1.3 when it was designed for 1.4.
#16
09/22/2006 (7:40 am)
Ok ok .. thank sorry for disturb thanks bye
#17
09/22/2006 (9:12 am)
void PhysXActor::initPersistFields(){	
   Parent::initPersistFields();	
     addField("MaterialBlock", TypePhysXMaterialDataPtr , Offset(mMaterialBlock, PhysXActor));
}
I think this is already correct .

TypePhysXMaterialDataPtr should be created when you use this

DECLARE_CONSOLETYPE(PhysXMaterialData)
in *.h

and
IMPLEMENT_CONSOLETYPE(PhysXMaterialData)
in *.cc

I've never had a look at the resource . But are some changes in TGE 1.4 when you registere a console type . And maybe that might be causing the problem.

Aun.
#18
09/22/2006 (10:33 am)
Mmmm
i put this but never...the problem persist....
very strange ... very very strange....uff
#19
09/22/2006 (11:58 am)
How to resolve this....Never person have a my equals problem?
#20
09/22/2006 (12:50 pm)
I'm not a big code monkey, but I believe the lesson here is to read and understand your error messages. I don't know a lot, but I believe I see the problem and it was pointed out to you already.

I've seen a lot of folks new to this come in and I myself have the problem, typos, aka typographical errors.

Good luck,

- Jon
Page «Previous 1 2