P
Prometheus1998_
Guest
I'm getting a strange error when using "ds_exists(ind,type)".
https://docs.yoyogames.com/source/dadiospice/002_reference/data structures/ds_exists.html
Here's the snippet of code:
Here's the error message I'm getting, in full:
The "type" argument is typed in exactly as the documentation page states it should, and the code editor has it colored in red, as it does all constants. What am I missing here, and how do I fix it?
https://docs.yoyogames.com/source/dadiospice/002_reference/data structures/ds_exists.html
Here's the snippet of code:
dsid is the id of the data structure, passed into the script via argument.
Code:
if ds_exists(dsid, ds_type_map){
return 0;
}
Here's the error message I'm getting, in full:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Other Event: Room End
for object obj_control:
ds_exists argument 1 incorrect type (undefined) expecting a Number (YYGI32)
at gml_Script_ds_check_type (line 7) - if ds_exists(dsid, ds_type_map){
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_ds_check_type (line 7)
called from - gml_Script_global_ds_clear (line 14) - type = ds_check_type(dsid);
called from - gml_Object_obj_control_EndRoomEvent_1 (line 1) - global_ds_clear(true);
############################################################################################
FATAL ERROR in
action number 1
of Other Event: Room End
for object obj_control:
ds_exists argument 1 incorrect type (undefined) expecting a Number (YYGI32)
at gml_Script_ds_check_type (line 7) - if ds_exists(dsid, ds_type_map){
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_ds_check_type (line 7)
called from - gml_Script_global_ds_clear (line 14) - type = ds_check_type(dsid);
called from - gml_Object_obj_control_EndRoomEvent_1 (line 1) - global_ds_clear(true);
The "type" argument is typed in exactly as the documentation page states it should, and the code editor has it colored in red, as it does all constants. What am I missing here, and how do I fix it?