Closed curiosity29 closed 1 year ago
The problem of highlight / documentation of vars/actions with the same name in different scopes is already documented in gama-platform/gama2#46 and it will not be addressed anytime soon (at least in this branch of GAMA).
For the rest, the behaviour is completely normal. x
in sp
is treated as a local attribute (although the highlight is again false as it points towards the global attribute) so when you write self.x <- x
or int x <- x;
you just do not change its value (which remains at 0
). If you wanted to change its value with the global x
, you'd have to write something like self.x <- host.x
or int x <- host.x;
Closing as it is (at least internally) a direct consequence / dependency of gama-platform/gama2#46
Describe the bug Using 2 variables or 2 actions with the same name in the global and in a species result in unexpected behaviors. With action
act
, the editor recognize does not highlight the correct action but still runs with the correct action in the species and produces an error warning if the action is missing like normal. With variablex
, the editor highlights the correct variable in the global but still runs with the wrong variable in the species.To Reproduce model Rename
Output
0
Screenshots action
act
variablex
:Additional context Same identification and output even with more specification: