derboo
Member
I'm using a ds map in a project to store special attributes for animation frames.
In the below example frameset is the ds map (which exists) state contains a string which is my name for the current animation frame, and "_xmove" is my name for one of the attributes, combined they form the name of the key to check for the corresponding value, like this:
if (ds_map_exists(frameset, state + "_xmove")) xmove = ds_map_find_value(frameset, state + "_xmove");
The above line worked without issues in GMS 1.4x, but in most (but not all!) cases when the key combined from state + "_xmove" does not exist, I get the following runtime error:
REAL argument is undefined
That even happens when I replace the right part with something trivial like xmove = 0 so the issue must be in the ds_map_exists check? But I can't figure out what would cause it, since it should just return false?
In the below example frameset is the ds map (which exists) state contains a string which is my name for the current animation frame, and "_xmove" is my name for one of the attributes, combined they form the name of the key to check for the corresponding value, like this:
if (ds_map_exists(frameset, state + "_xmove")) xmove = ds_map_find_value(frameset, state + "_xmove");
The above line worked without issues in GMS 1.4x, but in most (but not all!) cases when the key combined from state + "_xmove" does not exist, I get the following runtime error:
REAL argument is undefined
That even happens when I replace the right part with something trivial like xmove = 0 so the issue must be in the ds_map_exists check? But I can't figure out what would cause it, since it should just return false?