Having a variable called "score" that is global will be reverted to non-global when saving
Describe the bug
im editing a pizza tower fangame, and utmt happens to mess up most of the code I tend to edit when saving
Reproducing steps
- edit any code with a global value called score (global.score) that is having a new value set (i.e. global.score = 15)
- save
- said global.score variable will turn into score (i.e. score = 15)
- watch as the game you're modifying crumbles
Setup Details
- UndertaleModTool version: Github commit fa327ab
- Operating system: Windows 10
- Gamemaker Game: Internship Alpha 1.6, although this seems to happen with every game
this is not a bug. it is conflicting with the builtin global score variable. avoid using score since it's a deprecated variable.
Well, GameMaker games can theoretically use the builtin and a global in tandem. It's just a bad idea that apparently breaks the tool; I bet the same goes for other builtins, maybe even explicit self.score values.
@colinator27 whats the status with this on UA?
Just did a test and it seems to now compile correctly, but I'm not sure if it registers the variable correctly or not. Would be nice to re-test this fully on bleeding edge to see if anything breaks at runtime.