hell yeah this was helpful. I put the Load call in a try block and the Save call in a catch block in case there is no file present (but idk what i'm doing really so comments would be appreciated lol)
The LoadContent function gets called once when instantiated, it won't handle loop logic, I'm not too sure what you're trying to do, I could help more if you send the source code of your file.
@@dorllenius It's not in a loop, it's just a conditional in case there's no json file present. I'm using this for game settings, not save data, so someone might want to do something like delete the file to return to default. try { GameSettings = LoadSettings(); } catch { SaveSettings(GameSettings); }
in 5:02, when I run the program, I get an error message that my access is denied. I tried everything and I think that the problem is that my directory is read-only, did you by some chance had this problem or do you know how to fix it? If not, you can just delete this comment
hell yeah this was helpful. I put the Load call in a try block and the Save call in a catch block in case there is no file present (but idk what i'm doing really so comments would be appreciated lol)
The LoadContent function gets called once when instantiated, it won't handle loop logic, I'm not too sure what you're trying to do, I could help more if you send the source code of your file.
@@dorllenius It's not in a loop, it's just a conditional in case there's no json file present. I'm using this for game settings, not save data, so someone might want to do something like delete the file to return to default.
try {
GameSettings = LoadSettings();
} catch {
SaveSettings(GameSettings);
}
@@ar_xiv I see, have you tried using break points to see if the condition Is running?
@@dorllenius it works just from testing. But I guess it’s not really necessary because it will save when it needs to regardless……
Great Video
Thank you!
Hey my solution explorer is compleatly empty what do i do'
in 5:02, when I run the program, I get an error message that my access is denied. I tried everything and I think that the problem is that my directory is read-only, did you by some chance had this problem or do you know how to fix it? If not, you can just delete this comment
Thank You!
this would be so much easier if i knew json...
could you introduce me to him?
Tried Rider yet? It’s pretty nice to use compared to vs
I try to stay away from IDE's whenever I can so I use vscode and compile from source, only reason I'm using VS is becasue of the Monogame support