Difference between revisions of "Linked List Tutorial"

252 bytes added ,  13:22, 21 December 2023
no edit summary
imported>Haama
(Added error and byline tags)
Tag: Manual revert
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Unfinished}}
{{Errors}}
{{Errors}}
{{Byline}}
See [[Dynamic Storage]] for error reason.


By [[User:Tegid|Tegid]] 23:48, 4 May 2006 (EDT)
Preamble note: Since OBSE has added array manipulation to Oblivion script language, the implementation described in this article is only meaningful for modders that don't want to use OBSE in their mods.
 
 


==Unfortunate Realities==
==Unfortunate Realities==
Before we get started, let me address some unfortunate realities.  The code I wrote earlier won't work.  You can't call
Previous tutorial: [[Dynamic Storage]]
 
Before we get started, let me address some unfortunate realities.  As mentioned, the code in the previous tutorial is just conceptual and won't work.  You can't call
<pre>
<pre>
   set Curr.Child to Something
   set Curr.Child to Something
</pre>
</pre>
On a non-persistent reference. That means I can't call it on any of the objects I create in game.  So that causes a serious problem.  Fortunately there is a way to address it.
Because you cannot access the script variable ''Child'' thru a ref var ''Curr''.
 
That means I can't call it on any of the objects I create in game.  So that causes a serious problem.  Fortunately there is a way to address it.


==Creating a Real World Linked List==
==Creating a Real World Linked List==
Line 308: Line 313:
end</pre>
end</pre>


In both versions, we still need to handle someone ASKING for data.  So we also add this if block inside the OnActivate block.
In both version we still need to handle someone ASKING for data, so we also add this if block inside the OnActivate block.
<pre>
<pre>
   if (dataRequest)
   if (dataRequest)
Anonymous user