object_get_id
get the id of the object with the given name.
If object does not exists returns -1;
Source code
var last_id,i,ret;
ret=-1
last_id=object_add();
for(i=0;i<last_id;i+=1){
if(object_get_name(i)==argument0){
break;
ret=i;
}
}
object_delete(last_id);
return ret;