weapon

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, 15 are bundled with the SDK and some more can be found on the irrlicht page or here in the forum.
jimowns
Posts: 62
Joined: Thu Sep 28, 2006 5:28 pm
Location: X-Gamers

Post by jimowns »

yea i know the examples .

its dont whont to works to add my weapon in the screenNode .
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

But there are hundreds of threads on adding a weapon to a FPS camera.
jimowns
Posts: 62
Joined: Thu Sep 28, 2006 5:28 pm
Location: X-Gamers

Post by jimowns »

i realy looking on this forum To add a weapon to a FPS camera but i can't find .
jimowns
Posts: 62
Joined: Thu Sep 28, 2006 5:28 pm
Location: X-Gamers

Post by jimowns »

thanks zeno60 :D

i got a problem with this code

Code: Select all

gunnode->setParent(camera);  
but its says this

------ Build started: Project: Project1, Configuration: Debug Win32 ------
Compiling...
game.cpp
.\game.cpp(89) : error C2065: 'camera' : undeclared identifier
Build log was saved at "file://c:\Documents and Settings\Eigenaar\Bureaublad\Counter strike 9.0 my game\Project1\Debug\BuildLog.htm"
Project1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


i try to change camere to this gunnode->setParent(selector , camera); and more codes , and it keep saying thesame error .
Peasley
Posts: 3
Joined: Wed Dec 20, 2006 12:44 am

Post by Peasley »

well is "camera" the name of your camera node? It looks like your trying to give it a parent that doesnt exist.
zeno60
Posts: 342
Joined: Sun May 21, 2006 2:48 am
Location: NC, USA
Contact:

Post by zeno60 »

I could easily answer your question in a line, but its not an Irrlicht related error, it is a basic C++ problem you are facing, even one who does "programming in console" should know this error. But I am not because you will simply copy and paste into your code, and be back tommrrow with the same question about another "undeclared identifier."

http://www.cs.umbc.edu/courses/undergra ... rors.shtml

Declared identifier:

Code: Select all

MyClassName myClass;
myClass->Begin();
Undeclared identifier:

Code: Select all

myClass2->Begin();  
// Compiler dosen't know what myClass2 is!!!    
//Therefore it does now know from which class to get its Begin() method from
// If I were to say
myClass->Begin(myClass2);
// Still myClass2 is undeclared
http://www.codersource.net/cpp_tutorial_class.html
http://www.cplusplus.com/doc/tutorial/classes.html
jimowns
Posts: 62
Joined: Thu Sep 28, 2006 5:28 pm
Location: X-Gamers

Post by jimowns »

Peasley wrote:well is "camera" the name of your camera node? It looks like your trying to give it a parent that doesnt exist.
how do you mean ?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Listen to Zeno, he's giving you the best advice possible.
Image Image Image
jimowns
Posts: 62
Joined: Thu Sep 28, 2006 5:28 pm
Location: X-Gamers

Post by jimowns »

ok

i em so NOOB in irrlicht :(
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

It's not Irrlicht that's the problem, it's C++! :lol:
Image Image Image
jimowns
Posts: 62
Joined: Thu Sep 28, 2006 5:28 pm
Location: X-Gamers

Post by jimowns »

yeah in C++ :(
sow zeno60 i must need delete gunnode->setParent(camera);

if i do that i got the same problem with the weapon :s
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

That line of code is correct, keep the line of code, just think about what the two arguments should be; gunnode and camera.

It should be pretty self explanatory.
Image Image Image
jimowns
Posts: 62
Joined: Thu Sep 28, 2006 5:28 pm
Location: X-Gamers

Post by jimowns »

this code is dont giveing me errors but its keep dropping my weapon .

Code: Select all

gunnode->setParent(gunnode); 
Post Reply