Hi, sorry i dont konw a better thread name.
before i posted this read multiple threads in here and i also tryed to find a solution via google.
although i could find multiple threads with a null referenceexepction problem, none of the provided solutions could help me with my problem.
I hope this way someone might be able to explain to me what the hell is going on :/
So i basically want to add some player stats everytime some things happen and that is what iam doing:
public void ChangeStats() {
var request = new UpdatePlayerStatisticsRequest();
request.Statistics[0].Value++;
PlayFabClientAPI.UpdatePlayerStatistics(request, updatestat, errorCallback);
}
and the failure iam getting is:
"NullReferenceException: Object reference not set to an instance of an object PlayFabNews.ChangeStats () (at Assets/Scripts/PlayFabNews.cs:40)"
Line 40 in playfabnews is exactly the the line above "request.Statistics[0].Value++;"
so what do i have to instantiate here?
thanks for any help!