server/support/Support_EventTargets.cs:96
$InputTarget_[%targetName] = eval("return" SPC %targetFindCode @ ";");
%targetFindCode is influenced by :92
%targetFindCode = strReplace(%targetFindCode,"%this",%this);
%this is from :72
function SimObject::processInputEvent(%this,%eventName,%client)
Using the result of a raycast as a single object is pretty common as object logic works fine even with extra words, i.e.:
%ray = containerRayCast(...);
if (%ray)
%ray.processInputEvent(...);
... which would cause %this to receive that value.
The solution is to remove this, as eval receives %this from the local scope regardless:
%targetFindCode = strReplace(%targetFindCode,"%this",%this);
For example, this works fine (though of course there's no reason to use eval in this example):
%thing = findLocalClient();
%name = eval("return %thing.getPlayerName();");