incredible malfunction with pointers

Posted By: FEL

incredible malfunction with pointers - 11/23/14 19:27

Im on mobil so i will short this down.

I downloaded this nice codeexample:
http://badcom.at.ua/load/3dgs_stuff/3-2-2

This is an example for movement with a gun including animations.

So i tried to change the pointer name from weapon to pistol_1

i Replaced all weapon pointers with the new name, i dont changed something else, just this tiny name for all functions.

After that the weapon disappeared.

I Have no idea WTF i just changed one little word...
Posted By: 3run

Re: incredible malfunction with pointers - 11/23/14 19:45

Well, first of all, the link you've wrote above it wrong (I guess you are talking about example with 3rd person camera and aimnig at the center of the screen). About the error you've got, you've made something wrong and there is no doubt, cause the example itself (even if it's terrible and very basic) works without any problems. Yet, I can't see a reason for you to create this thread, you want to ask someone to look throw your code and fix it for you? I'm pretty sure, no one will do that... smirk

Edit: on the second thought, I think (if weapon disappears) you've probably deleted it.. yet there are some functions looking the the weapon model, but as it doesn't exist any more, you get pointer error. Don't just copy&paste the code, that won't help you to create something playable, go throw it and learn. Better ask for explanation, then doing something like that..

Greets
Posted By: FEL

Re: incredible malfunction with pointers - 11/23/14 19:52

Was a simple topic xd all about the pointer. And after reading the manuell another few times i figured out: pointers cant have special "chars" like /-_:;(_)... it was all about that crappy simple thing xd and i missed it completly xd. So im god cause i fixed it myself :3
Posted By: MasterQ32

Re: incredible malfunction with pointers - 11/23/14 19:57

No variable or function can't any symbols except a-z, A-Z, 0-9 and _. Also special names like if, while, do, ... can't be used as a variable or function name.
Posted By: FEL

Re: incredible malfunction with pointers - 11/23/14 20:12

That was the error yes :-) after i changed the pointers to proper values everythings works. I should have knewit smirk such a cruel little thingy
© 2024 lite-C Forums