if you compile a plugin with this code (also in the debugger)
DLLEXPORT void SSGM_GameOver_Hook()
{
char MVP[32];
sprintf(MVP,"%s",The_Game()->MVPName); //MVP = 0x0013ec8c ""
if (strlen((const char *)MVP) <= 1)
{
sprintf(MVP,"%s","NULL");
}
printf("[game_end] %s %u %u %u %d %s\n",Data->CurrMap,The_Game()->GameDuration_Seconds,The_Game()->WinType,The_Game()->WinnerID,Get_Team_Score(The_Game()->WinnerID),MVP);
}
it will error at the printf..
this is because:
when there are no players ingame there is no MVP.
therefore The_Game()->MVPName is...
Dante |
reading the memory space of where the "mvp name" is supposed to be
|
MVP = 0x0013ec8c ""
First-chance exception at 0x0238dbc6 (Plugin.dll) in server.dat: 0xC0000005: Access violation reading location 0x40b38800
Fix for v4.0 please
[Updated on: Mon, 27 October 2008 14:10]
Report message to a moderator