• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 Get rid of ds_map_get, please, soon!

Tsa05

Member
Holey cripes. Red highlights
Just downloaded the latest IDE (2.0.6.136) and runtime (2.0.6.93) and immediately had a zillion error messages because ds_map_get(id, key) expects 2 arguments and I'm passing it 3.

Only problem is, there is no ds_map_get function. There never has been. There isn't one now, according to the documentation--the function isn't found in the manual. I needed a variation of the result from the default function so I chose that function name in my own project specifically because it was descriptive but syntactically different from ds_map_find_value.

I understand having functions like draw_set_color and draw_set_colour because of regional spelling, but please, can we never have variations of grammar too? ds_map_look_for, ds_map_see_if_its_there, ds_map_fetch, ds_map_request..... there'd be no end.

ds_map_get just appeared today, and it's not documented and it's redundant--can it please just be nixed?
 
Last edited:

Mike

nobody important
GMC Elder
Can you file this with a link to your project please, and we'll take a look.

ds_map_get( ) I believe is used in accessors (or DnD - not sure which), but it's one that is automatically added. But we'll need to see your project as to why your getting this.
 

Tsa05

Member
@Mike I'm out and about but could link the file later if needed, but...
I was able to create a blank, new project and to type
ds_map_get (
Into the code window of object0. It recognized this as a function (colored it) and suggested id, key as parameters immediately.

Providing any 3 arguments causes the ide to highlight in red and to show the "expected 2" error when I hover over the line.

Up until last night, I've been able to use my own defined ds_map_get function (which takes 3 parameters) without the error highlight.

I had no idea the function was actually used by Gms, since the naming all follows ds_map_find_X naming. Should I not use it?

Edit: filed bug, screenshot, sample file. Curious about whether there's a set of additional hidden function names we should avoid using...
 
Last edited:

Mike

nobody important
GMC Elder
Ahh... you have your own script called this? okay there IS a built in function called this which we've exposed (as it's there anyway). It is however not compiling with it - just showing it up in the IDE. We'll fix the compile part, but you'll have to rename your script as it now clashes with a new built in function (even adding an underbar or something in front, or an _ext at the end)
 

GMWolf

aka fel666
How about making ds_map_get a proper documented function? I really hate the current ds_map_find_value function we currently have, its far too long! (Yes, I know, accessors :) )
 
You can't use accessors for stacked maps though. I'd love a ds_map_get() instead of ds_map_find_value() or just as an alternative name.

Code:
ds_map_find_value(map[? other_map],value);
 

Mike

nobody important
GMC Elder
For using now do it if you need to. But it looks like we'll remove them in the next release, so you might be able to name them back again. We're checking.....
 
Top