View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0029203||Runner||Extensions||Public||2018-03-26 08:33||2018-10-29 16:14|
|Reporter||YellowAfterlife||Assigned To||Alan Savage|
|Priority||High||Severity||B - Major||Reproducibility||100%|
|Platform||Windows||OS||Windows 10||OS Version||Pro 1703+|
|Target Version||2.2.1||Fixed in Version||2.2.1|
|Summary||0029203: Extensions: GML scripts aren't always added to script list|
|Description||An interesting thing. In GMLive, I ran into issues with extension script IDs sometimes pointing to a wrong script (seemingly dependent on order of inclusion of extensions). So I have made a workaround (filling up a ds_map with script_get_name -> script index data in a loop) and that worked fine.|
This weekend I've been trying to get it to work on HTML5 (again), but found that GML extension scripts are never added to Scripts/ScriptNames arrays in game JSON. Making a test project with an extension (attached), I've found that for it the extension scripts aren't considered as "real" scripts even on native builds.
Ability to reference/call extension scripts was introduced relatively recently but something is very off with this feature.
|1.4 Found In|
|2.x Runtime Found In||126.96.36.199|
|2.x Runtime Verified In||188.8.131.529|
a_bug.yyz (55,297 bytes)
only issue here was that asset_get_index(), script_exists(), script_get_name(), script_execute were not working for extension functions - for native the reason is that the extension is not included if no functions are explicitly called, this is as intended; the fix is for html5 where these calls would never work for extension functions.
sample will now work for html5 as is, for native an explicit extension function call or init function must be included to pull in the extension