ive got this absolutely stupid problem.
ive setup a function that loads and sets up a animated sprite, and it works fine, granted you call it after the level is loaded or before(i set it so that it would load the data up when called).
but when i set up some code to call that exact same function when a key is pressed, it crashes my game
so can someone point out something.
Thanks in Advance.
here is what the function calles : some unimportant stuff has been left out.
sprites.push_back(AnimatedSprite(D3DCOLOR_COLORVALUE(1.0f, 1.0f, 1.0f, alpha), numberofframes, PosX, PosY, Type, (UINT)width, (UINT)height, fsx, fsy, ws.c_str()));
unsigned int i = sprites.size();
sprites[i - 1].Load2(device);
sprites is a std::vector






