View Issue Details

IDProjectCategoryView StatusLast Update
0030548RunnerWindows 8 (YYC)Public2019-02-28 11:13
ReporterStewart BishopAssigned ToRussell Kay 
PriorityHighSeverityB - MajorReproducibility100%
Status ClosedResolutionFixed 
Product Version2.2.2 
Target Version2.2.2Fixed in Version2.2.2 
Summary0030548: Windows (YYC): "error: member reference base type 'double' is not a structure or union" when using div
DescriptionWithin the following code snippet this will not compile on YYC:

var scrollTo = -4;

enum EXTRAS {
    ITEMCOUNT = 10
}

totalItems = EXTRAS.ITEMCOUNT;
scrollTo = -((totalItems div 3)-1)*250;
show_debug_message(scrollTo);

The line containing the div will cause the following error:

C:/Source/IDE/Studio2/GMS2CACHE/MacroTest_DD6EFC96/MacroTest/default/Scripts/gml_Object_object0_Create_0.gml.cpp:23:64: error: member reference base type 'double' is not a structure or union
local_scrollTo=(YYRValue( -(yyfdiv((*sself_totalItems), 3) - 1).asReal() ) * 250);

If you change the lines as follows you're able to workaround the issue for now:

//Fails to compile
scrollTo = -((totalItems div 3)-1)*250;

//Works
scrollTo = -(floor(totalItems / 3)-1)*250;
Steps To Reproduce1) Run the sample on YYC
TagsCompiler
1.4 Found In
2.x Runtime Found In2.2.2.308
2.x Runtime Verified In2.2.2.311

Activities

Stewart Bishop

2019-02-21 16:57

Adminstrator  

MacroTest.yyz (19,922 bytes)

Russell Kay

2019-02-22 12:29

Manager   ~0063289

Fixed in gitlab

Dan

2019-02-25 11:47

Adminstrator   ~0063312

Runtime 309+

Scott Dunbar

2019-02-28 11:13

Adminstrator   ~0063387

Verified fixed, Closing
IDE 2.2.2.396 Runtime 2.2.2.311