Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi, I have just tried to update to beta 10 in a project where beta 8 works fine and I get this error:

global variable name 'TGMS' index (100020) not set before reading it.
 at gml_Script_TweenEasyScale (line 75) - __TweenEasyScale = TweenFire(id, ease, mode, global.TGMS.EasyUseDelta, delay, duration, "image_xscale", x1, x2, "image_yscale", y1, y2);
############################################################################################
gml_Script_TweenEasyScale (line 75)
gml_Script_Create_Bounce (line 88)
gml_Object_obj_Start_Create_0 (line 1) - Create_Bounce();

The  Create_Bounce() script is triggered in the Create Event of an object:

/// @func Create_Bounce()
function Create_Bounce()
{
    var _in_xscale = image_xscale;
    var _in_yscale = image_yscale;
    script_execute(TweenEasyScale, 0, 0, _in_xscale, _in_yscale, 0, 90, EaseOutElastic);
}

If I revert back to beta 8 it works again.

GMS 2.3.7.606 runtime 2.3.7.436

(4 edits)

Thanks for reporting this!
This error only seems to happen when calling an Easy Tween at the VERY START of the game.

You can get around this by delaying the call by one step, or you could modify TweenEasyScale (and other easy scripts). You would need to change:

if (!instance_exists(o_SharedTweener)) SharedTweener();
to :
SharedTweener();

I'll aim to include this change in the next beta release. I'm aiming for one this weekend. -Stephen

Great, thank you!

In case you didn't get messaged about the update, the latest TweenGMS 2 beta (11) should fix the issue you mentioned above. Let me know if any trouble persists. :)

(+1)

Thank you for the reminder!
I have just checked beta 11 and it works fine.
Great workk!!!

-Alberto