Open-SAMP-API
Open-SAMP-API copied to clipboard
crash when using api
My game does crash instantly as soon as I make a simple API call. SAMP does catch the exception at 0x02170245. My game is not modded, I am running everything through WINE, tho. I am compiling on a Windows 7 virtual machine in order to run it on my host with WINE.
#pragma comment(lib, "bin/Open-SAMP-API.lib")
#include "SAMP_API.h"
#include <iostream>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
int main()
{
std::cout << "started" << std::endl;
SendChat("test");
return 0;
}
Is just SendChat
crashing?
Just tried GetPlayerHealth
, it does crash also. Seems like no API-call is working.
I think then it's crashing because of WINE, maybe Wine "simulate" the Windows memory not completely and something went wrong somewhere. You just can try to debug it by yourself (e.g. what's at 0x02170245, it is inside the memory range of the API, etc.)