PDA

View Full Version : C++ help [Calling starcraft fxns]



Zephyrix
11-17-2005, 07:42 PM
Here we go.
I have a weird problem, anyone wanna help? I defined a function,


void __fastcall BWFXN_PrintText(char* text){__asm{
xor edx, edx
mov ecx, text
mov ebx, 0x0046E600
call ebx
retn
}}


And when I try to call it with BWFXN_PrintText("Test"); SC magically crashes.
Any ideas why, and how to fix it? Any help is appreciated.

bulk_4me
11-17-2005, 08:00 PM
retn? Why would you need that?

Perma
11-17-2005, 08:07 PM
I concur. I don't see why a retn is necessary in this case.

Zephyrix
11-17-2005, 08:30 PM
Zomg secks, it works =3