View Issue Details

IDProjectCategoryView StatusLast Update
00313992.x IDE BugsDnD EditorPublic2019-11-13 14:27
ReporterPatrick RocheAssigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
Status AssignedResolutionOpen 
PlatformWindowsOSWindows 10OS Version
Product VersionInternal Build 
Target Version2.3.0Fixed in Version 
Summary0031399: DND - Auto Complete adds global. to Set Global Variable names
DescriptionIf the user creates a global variable (global.player_lives for example) and adds a Set Global Variable block in DND, when they attempt to set the name of the global variable to be set, the code Auto Complete function will auto complete to global.player_lives. This means that the code that's being called in runtime is actually global.global.player_lives, meaning the game will crash when the player performs the action that would set the variable.

The system should be aware of the way Set Global Variable appends all variable names in it with global. to avoid this issue.
Steps To Reproduce1 - Launch GMS2 in DND
2 - Create an object
3 - In Game start for that object, create a Set Global Variable code block
4 - Set a global variable named player_lives with any value
5 - Create another object
6 - In any player triggerable event, add a Set Global Variable block
7 - In 'Name' type player_lives
8 - Notice Auto Complete has suggested global.player_lives
9 - Accept Auto Complete's suggestion
10 - Open live preview of that event
11 - Notice that the Set Global Variable is attempting to set global.global.player_lives
TagsGM2KI
2.x IDE Found In2.2.2.4.456
2.x Runtime Found In2.2.2.3.344
2.x IDE Verified In
2.x Runtime Verified In

Activities

Patrick Roche

2019-10-01 15:03

Adminstrator  

screenshot.1.jpg (70,699 bytes)
screenshot.1.jpg (70,699 bytes)
screenshot.2.jpg (30,173 bytes)
screenshot.2.jpg (30,173 bytes)