A runtime error can't be on compile (that would be a compile error). What kind of error do you have? If you get an error always post it's error-message.
If it's a runtime crash then most likely smgr is not correctly initialized at that point.
it isn't an error : when i lunch the program and the function schoot blocks start the program crasch and the visual c++ schow the line where the program crasch
Yeah, already told you the most likely reason - smgr not pointing to the correct place in memory. Can't tell more with just seeing this part of the code.
Brr... just post code in the forum, don't PM such stuff please.
Your problem is basically that you have a global and a local version of smgr which have the same name but nothing to do with each other otherwise (aka they are _not_ the same space in memory which is the main reason for variables - variables are names to make it easy for you to refer to a part of the memory). Your smgr in main() overrides the global smgr (when names do clash the compiler always uses the one declared in the most inner scope). So that smgr in your main() is only valid inside the scope of main and you do assign the irrlicht scenemanager only to that variable. While in SchootBlocks you use the global smgr instead which is never initialized anywhere, so it just points to a random place in memory.
You have several choices:
1. Use only the global (ugly, but works for such small programs)
2. Remove the global and pass smgr as parameter to every function which needs it.
3. Remove the global and local smgr and use classes instead and put it into the same class where your functions are in.
Pass the smgr to the class and allow access to it from other classes on need. That's the object oriented way.
What do you not understand? What a global is? How to remove a variable? How to pass a variable as function parameter? How to put variables in a class?
There is no point in coding that for you unless you understand what's going. Otherwise you will just be back an hour later with your next problem and expect someone to spell it out for you.
Please no cross-posting of problems. We just delete cross-posted threads. And the compiler can only check your code for syntax - it has no idea what the code should do. If your program works or not depends on you coding skills and not the compiler.
Maybe it's outside the camera view. Or any other problem. Why do you ask for every step in your program for help in the forum? Start figuring out things for yourself. If this is still too hard then write simpler programs first - learning c++ and 3D programming at the same time is way too hard. Do simpler programs first until you know c++ good enough.
I understand the C + + and irrlicht a little less but my code would place the 'object where the camera and map collidono.Per this I have no idea why the code does not go right and you can check yourself over ...