Hello everyone. So i am doing some random programming and testing in half life sdk. I am creating a plasma gun that fires plasma balls. I copied the code of bullsquid's spit class and modified it. The game crashes without error when i fire the gun. I went into debugging and added console messages in certain places in the code. It seems it breaks on this line:
CPlasmaBall* pBall = GetClassPtr((CPlasmaBall*)NULL);
What is the problem here?
Edit: So i ran a proper VS debugging and it this is the error:
"Exception thrown at 0x00000000 in hl.exe: 0xC0000005: Access violation executing location 0x00000000."
at this location in 'CBase.h' in GetClassPtr method:
// allocate entity if necessary
if (pev == NULL)
pev = VARS(CREATE_ENTITY()); <-- HERE