I must have tried this many times before but never got it working correctly. What is wrong with this script. I used Wiki for the function. Please don't point me to another article in a wiki, just please fix this. Thank you.
Quest Property myquest AutoInt Property PreReqStage AutoInt Property StageToSet AutoObjectReference Property Actor AutoInt Function GetDayOfWeek() Int GameDaysPassed GameDaysPassed = GetPassedGameDays() return GameDaysPassed % 7EndFunctionEvent OnTriggerEnter(objectreference akactionref)if akactionref == game.getplayer()If myquest.GetStage() == PreReqStageIf GameDaysPassed == 5Actor.Enable()myQuest.SetStage(StageToSet)endifendifendifEndEvent