UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.13k stars 213 forks source link

Having a variable called "score" that is global will be reverted to non-global when saving #1457

Open AndrewIdot opened 1 year ago

AndrewIdot commented 1 year ago

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

  1. edit any code with a global value called score (global.score) that is having a new value set (i.e. global.score = 15)
  2. save
  3. said global.score variable will turn into score (i.e. score = 15)
  4. watch as the game you're modifying crumbles

Setup Details

  1. UndertaleModTool version: Github commit fa327ab
  2. Operating system: Windows 10
  3. Gamemaker Game: Internship Alpha 1.6, although this seems to happen with every game
fixdude commented 1 year ago

this is not a bug. it is conflicting with the builtin global score variable. avoid using score since it's a deprecated variable.

Jacky720 commented 1 year ago

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.