Hello.
Code:
void onPvpKill(Player* plr, Player* victim)
{
QueryResult * CurrentKS = WorldDatabase.Query("SELECT * FROM killstreak WHERE playerid = '%u'", plr->GetGUID());
QueryResult * VictimKS = WorldDatabase.Query("SELECT * FROM killstreak WHERE playerid = '%u'", victim->GetGUID());
uint32 ks1 = 0;
uint32 vks = 0;
ks1 = CurrentKS->Fetch()[1].GetUInt32();
vks = VictimKS->Fetch()[1].GetUInt32();
}
I've been coding some things, just to raise my knowledge. But when I try this code, and I kill a player it makes my server crash.
It has been working before without the Victim getGUID() part.
And if I remove vks = VictimKS->Fetch()[1].GetUInt32(); there is no crash, but I have no clue why it crashes the server?
Greetz,
GotenkZ