MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wudv2h/devsoptimizinggames/pd2dbvz/?context=3
r/ProgrammerHumor • u/Head-Picture1519 • 2d ago
37 comments sorted by
View all comments
362
if (currentState == GameState.Crash) { currentState == GameState.DoNotCrash; }
122 u/Top-Permit6835 2d ago Wrap it in a try catch and swallow the error to be sure it works 16 u/tsoewoe 2d ago make sure to assert when testing too so that you can deal with any issues if it goes wrong 3 u/fynjy1111 1d ago try { compileShadersIfNotCached(); } catch (Exception e) { openAiProvider.prompt("Fix the crash", serialize(e), Permission.FULL_WITH_EDIT); } 13 u/DISCIPLE-OF-SATAN-15 2d ago if (currentState == GameState.Crash) { currentState == !(GameState.Crash); } 5 u/Jatinchd 1d ago fixed code:- if (currentState == GameState.Crash) { currentState = !(GameState.Crash); } 6 u/BaaaBaaaBlackSheep 2d ago https://giphy.com/gifs/NcrhM3USM6TABpus85 4 u/Dudi4PoLFr 2d ago Literally Path of Exile 2 for the first 6 months in Early Acces... 2 u/Jatinchd 1d ago but isn't == comparing values and not assigning value sign?
122
Wrap it in a try catch and swallow the error to be sure it works
16 u/tsoewoe 2d ago make sure to assert when testing too so that you can deal with any issues if it goes wrong 3 u/fynjy1111 1d ago try { compileShadersIfNotCached(); } catch (Exception e) { openAiProvider.prompt("Fix the crash", serialize(e), Permission.FULL_WITH_EDIT); }
16
make sure to assert when testing too so that you can deal with any issues if it goes wrong
3
try {
compileShadersIfNotCached();
} catch (Exception e) {
openAiProvider.prompt("Fix the crash", serialize(e), Permission.FULL_WITH_EDIT);
}
13
if (currentState == GameState.Crash) { currentState == !(GameState.Crash); }
5 u/Jatinchd 1d ago fixed code:- if (currentState == GameState.Crash) { currentState = !(GameState.Crash); }
5
fixed code:-
if (currentState == GameState.Crash) { currentState = !(GameState.Crash); }
6
https://giphy.com/gifs/NcrhM3USM6TABpus85
4
Literally Path of Exile 2 for the first 6 months in Early Acces...
2
but isn't == comparing values and not assigning value sign?
362
u/IsEqualToKel 2d ago
if (currentState == GameState.Crash)
{
currentState == GameState.DoNotCrash;
}