Help me with calling a game function in DLL (crash)

05/11/2013 22:13 cortexio#1
Heya,
Gonna make it short, my game crashes when i call my function, the address of the function is fine. I hope someone here can tell me what's wrong.

Code:
Code:
if(msg == "Cast4"){
typedef int ( __stdcall *Spellcast)(DWORD , DWORD);
Spellcast castmyspell = (Spellcast)0x00B908F0;
castmyspell(6, 0);
}
IDA:
[Only registered and activated users can see links. Click Here To Register...]

CheatEngine: (+registers on breakpoint)
[Only registered and activated users can see links. Click Here To Register...]
05/12/2013 00:00 Omdi#2
This looks like thiscall, you have to pass the thisptr to the function.