Page 2 of 3

Posted: Wed Dec 20, 2006 10:15 pm
by hybrid
Yes, 15 are bundled with the SDK and some more can be found on the irrlicht page or here in the forum.

Posted: Wed Dec 20, 2006 10:17 pm
by jimowns
yea i know the examples .

its dont whont to works to add my weapon in the screenNode .

Posted: Wed Dec 20, 2006 10:21 pm
by hybrid
But there are hundreds of threads on adding a weapon to a FPS camera.

Posted: Thu Dec 21, 2006 10:16 am
by jimowns
i realy looking on this forum To add a weapon to a FPS camera but i can't find .

Posted: Thu Dec 21, 2006 4:25 pm
by zeno60

Posted: Thu Dec 21, 2006 5:44 pm
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 .

Posted: Thu Dec 21, 2006 5:47 pm
by Peasley
well is "camera" the name of your camera node? It looks like your trying to give it a parent that doesnt exist.

Posted: Thu Dec 21, 2006 5:51 pm
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

Posted: Thu Dec 21, 2006 5:59 pm
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 ?

Posted: Thu Dec 21, 2006 6:16 pm
by JP
Listen to Zeno, he's giving you the best advice possible.

Posted: Thu Dec 21, 2006 6:23 pm
by jimowns
ok

i em so NOOB in irrlicht :(

Posted: Thu Dec 21, 2006 6:30 pm
by JP
It's not Irrlicht that's the problem, it's C++! :lol:

Posted: Thu Dec 21, 2006 6:41 pm
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

Posted: Thu Dec 21, 2006 7:03 pm
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.

Posted: Thu Dec 21, 2006 7:10 pm
by jimowns
this code is dont giveing me errors but its keep dropping my weapon .

Code: Select all

gunnode->setParent(gunnode);