That is, why it doesn't exist, shouldn't exist, and how it can exist.
I've spent today thinking about how Studio is lacking the execute_file() and execute_string() commands.And there's a fair number of reasons why this is so.- [#]Piracy concerns.
It's extremely easy to create your own GML runner. Sure, it makes Game Maker a significantly harder language to use, but it's still possible. This runner can then bypass all of the free-version limitations (provided someone with a paid copy compiled the executable.)
The only real features lost are things like the loading bar, icon, and game-info.
[#]Safety concerns.
Look, I shouldn't have to tell you that letting your code run someone else's code without any safeguard can be a problem.
Keyloggers, viruses, various kinds of bots, and any other malicious software can be transmitted this way. (Not to mention older versions of Game Maker weren't so safe with the filesystem access thing. Hello, system32.)
[#]Rare usage.
The most common usage case for these commands that I've ever seen is level editors and readers, which can easily be done in .INI format (depending on the game, though this lacks security) or a custom format (which is really not hard to do).
Games using this style of saving/loading for maps are particularly at risk of the above safety concerns. I could easily write in some code among the instance_create()s to execute a .DLL saved along with the 'map', or even have the .DLL itself embedded into the map file, creating the actual .DLL file before executing it.
TL;DR: execute_string() and execute_file() are gone because they are lazy and dangerous. You can still execute strings and files if you take the time to do it properly.
Yes there is, if you make it. (Possible)
Also, it is possible to have user made levels with out execute file. Very easy really.Cheats are harder but still possible as link pointed out.Also, Kilin, I can't believe you didn't know about pass ds's XDI don't use GM's data structures because I haven't really needed them. Plus they tend to be a little counterproductive (in efficiency) especially when compared to their programming language counterparts. I remember a long time ago, I tried to pass arrays through a function but ever since then, I've come up with alternatives. I'm just impressed to see all the measures they're taking to make GML work more like mainstream programming languages.
If GM's arrays weren't arbitrarily typed, then I'd look at data structures, because my usual method of dealing with that (a linked list of objects with separate member variables) isn't really practical in GM.I mean is there one already made somewhere.
What if one of the other systems is windows 8? Edit: nvm, link ninjed ahead of me
Also I like speed tyvm, having that would make gamemaker so much slower. Plus it's not penalising, you don't need executestring to do anything.there's nothing wrong with not using ";" ,unless you need it, is there? '^^'
Actually, GM once flagged code outside a function as an argument. So, it is useful.
Brackets should stop that though. If they didn't, you could hardly blame the programmer.