Difference between revisions of "Talk:Reference Variables"

Jump to navigation Jump to search
173 bytes added ,  13:19, 15 November 2010
no edit summary
imported>Diarrhoe
imported>QQuix
Line 184: Line 184:
I always get a message of an "unknown variable" and a missed parameter. It's not the message itself, which I don't understand, but the reason for that behaviour, especially since
I always get a message of an "unknown variable" and a missed parameter. It's not the message itself, which I don't understand, but the reason for that behaviour, especially since
<pre>set anyReference.anyVariableStoredInTheReferencesScript to x</pre>
<pre>set anyReference.anyVariableStoredInTheReferencesScript to x</pre>
compiles at least.
compiles at least.-[[User:Diarrhoe|Diarrhoe]] 12:44, 14 November 2010 (EST)


 
:The reason is that the compiler does not know which reference might be stored in the ref var at run time, therefore it cannot determine the script attached to that reference in order to check if there is a var with that name.
Edit: I did some further testing. And it seems, that even with quests, there occur problems. So
:To access vars in other scripts, you must explicitly refer to the reference or quest by its EditorID: MartinRef.playerStatue or Arena.Timer [[User:QQuix|QQuix]] 13:19, 15 November 2010 (EST)
<pre>ref q
 
set q to anyQuest
setStage q x</pre>
compiles, while
<pre>ref q
 
set q to anyQuest
set q.anyVariableInQsQuestScript to x</pre>
does not.-[[User:Diarrhoe|Diarrhoe]] 12:44, 14 November 2010 (EST)
Anonymous user

Navigation menu