Editing GetSelf
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
==Notes== | ==Notes== | ||
<ul> | <ul> | ||
<li> | <li>Because reference functions can be called on the scripted reference implicitly by omitting explicit reference syntax, the following code structure should never be used: | ||
<pre>ref rSelf | |||
<pre> | |||
ref rSelf | |||
set rSelf to GetSelf | set rSelf to GetSelf | ||
rSelf. | rSelf.ReferenceFunction</pre> | ||
Instead, just use code like this: | |||
<pre>ReferenceFunction</pre> | |||
</li> | </li> | ||
<li>[[GetSelf]] will return 0 if called on a reference that has been created dynamically (for example, created via [[PlaceAtMe]], or dropped from an inventory into the game world). | <li>[[GetSelf]] will return 0 if called on a reference that has been created dynamically (for example, created via [[PlaceAtMe]], or dropped from an inventory into the game world). |