AM2R-Community-Developers / AM2R-Community-Updates

Source code for AM2R 1.5.2+, free of copyrighted assets and trademarks.
https://www.reddit.com/r/AM2R/
Other
137 stars 25 forks source link

Display options crashes #92

Closed Miepee closed 2 years ago

Miepee commented 3 years ago

https://github.com/AM2R-Community-Developers/AM2R-Community-Updates/blob/df6576c1064881a711d96b825042eae5bab3fbb1/objects/oOptionsDisplay.object.gmx#L49-L67

These have been wrongly refactored. The correct order should be this instead:

opVSync = i++
opShowHUD = i++
opShowMap = i++
opCounterStyle = i++
opShowHints = i++
opButtonType = i++
opShowScans = i++
opLanguage = i++
opSensitivity = i++
opWidescreen = i++

This does get rid of the organized order you currently have there, but fixes the crashes.

Other way to solve this, would be to refactor the whole oOptionsDisplay.

Miepee commented 2 years ago
############################################################################################
FATAL ERROR in
action number 1
of Other Event: User Defined 2
for object oOptionsDisplay:

Unable to find any instance for object index '0' name 'oTestKeys'
at gml_Object_oOptionsDisplay_Other_12
############################################################################################

is the crash message. Reason it crashes, is because op[opButtonType] results to 0 (the ID for oTestKeys) so it then tries to access oTestKeys.optext

Lojemiru commented 2 years ago

I fixed this and committed but failed to mention the issue. Resolved.