"mob/proc/Attack(Target as mob|obj|null in view())" returns this warning message.
Removing "in view()" gets rid of the warning. Putting "in view()" between "Target" and "as mob|obj|null" does not work at all.
The code works with the warning, but figured I better figure out why I get it.
Note: This code is an oversimplified version of what actually exists. I've tested it with this code and duplicated the warning message.
|
||||||||||||
Here's an example Tom posted a while back:
The fix is to reverse the order so it reads:
as null|obj in src.wares
which means:
as null or (obj in src.wares)
So in your case, you probably want
mob/proc/Attack(Target as null | (mob|obj in view()))