D
DarthTenebris
Guest
Hello everybody,
As the title says, I have an array containing a bunch of maps and an extra:
I'm trying to check whether the key "id" in both maps are the same:
Unfortunately the compiler doesn't like that, saying:
Have I done something dumb again or have I found a bug?
Thank you for your time.
As the title says, I have an array containing a bunch of maps and an extra:
Code:
for (var i = 0; i < 5; i++) {
for (var j = 0; j < 5; j++) {
playerInventory[i, j] = ds_map_create();
}
}
mouseInventory = ds_map_create();
Code:
for (var i = 0; i < 5; i++) {
for (var j = 0; j < 5; j++) {
if (playerInventory[i, j][? "id"] == mouseInventory[? "id]) {
doSomething();
}
}
}
However, if I replace the accessor with ds_map_find_value(), the compiler is perfectly happy with it:got '[?' expected ')'
malformed assignment
Code:
if (ds_map_find_value(playerInventory[i, j], "id") == mouseInventory[? "id"]) {
doSomething();
}
Thank you for your time.