I'm sure this is very simple, but I couldn't find it on the manual's page about structs, so I have two very short questions about structs.
1. how do I loop over a struct's member names and values (including variables, methods and sub-structs)?
2. how do I check if a struct contains a certain...
GM Version: 2.3+
Target Platform: ALL
I wrote a blog post going over the various 2.3+ syntax additions, how they work, and how to use them!
Also included is a list of breaking changes and how to get around them.
Links: web demo · itch.io (has a downloadable demo) · marketplace (uploading is currently broken...) · documentation
Price: USD 9.95
This extension lets you parse and syntax highlight GML code!
It comes in multiple flavours:
GML: Lets you syntax highlight GML code inside GameMaker...
I watched a cutscene tutorial and do exactly what she taught,but I got the following error when running
FATAL ERROR in
action number 1
of Other Event: User Defined 0
for object oCutscene:
trying to index a variable which is not an array
at gml_Object_oCutscene_Other_10 (line 1) -...
I read that one can create nested arrays in gms2 with the following code:
var array = [[x1,x2,...],[y1,y2...]];
It works, however the syntax for calling a single point within a nested array does not work with any standard gml method. What is the syntax? I can't seem to find the documentation...
I've set up a ds_list with each position of the list being coordinates. It looks like this:
global.grad3 = ds_list_create();
I'm trying to create an on-screen stopwatch, and I have an error coming up when I try to use "mod." Here's the line of code with the error:
s = s mod (rs*60);
All it tells me is that there's an unexpected syntax error. Does anyone know what's wrong?
Thanks in advance!
I have a really simple question and that is why do people have in their videos of their code and on different forms a ";" at the end of almost every line? Is there a specific rule with it or does it help the code in some way or just for aesthetics? I would really like to know...
Hello, I'm new to GMS2 coming from 1.4. I've got a window in the IDE that lists a dozen or so "Syntax Errors", but I am able to compile and run my game. Also, the syntax errors don't look like errors to me.
For example, there is this one:
tristero_dialog_box at line 8, 7 : number of...
I'm getting a syntax error at line 20 in my fragment shader and I'm unclear as to what is wrong. Line 20 is the one that is: color2 = vec3(texture2D(colorMap, vec2(1.0, i/mapHeight))
The general goal of this shader is to compare the colors of a sprite in an object with the colors in a vertical...
I found out that syntax has to be a little bit more strict with HTML5, and you can't call a variable from another object in the code of your current object (It makes sense because the HTML5 version of the game is crashing and it's occurring when objs with code calling for vars of other...
Using v1.4.1763 of GM:Studio.
Every time I attempt to debug on Android, I get this error:
For some reason it's prefixing \\\? at the start of that string where it's looking for the build.gradle file, right before C:\
Why is GM doing this? I've cleared all of the cache, tried changing the...