ScriptID(): Difference between revisions

From Sierra WikiNew
Jump to navigationJump to search
No edit summary
 
m (1 revision imported)
 
(No difference)

Latest revision as of 00:14, 3 June 2024


ScriptID()



Description

From the SCI Specs:

Kernel function 0x02:ScriptID(word, word)

kfunct 0x02: ScriptID (word ScriptNr, word DispatchNr);

(word) ScriptNr: Number of the script to reference (word) DispatchNr: Number of the Dispatch entry inside the script to reference

Returns: (HeapPtr) : The address pointed to by the specified element of the dispatch/exports table (script block type #7)

This function returns the address pointed to by an element of a script's dispatch table.


From the Official Kernel FunctionS:

(ScriptID script [entry])

Return the object ID for the object which at entry number entry in the publics table of script number script. This will load the script if it is not already in memory. If entry is not present, this returns the ID of entry number 0 of script.


From the SCI Companion Documentation:[1]

ScriptID (Kernel)

ScriptID(scriptNum [index])

Returns the address in memory pointed to by entry Index in the exports segment of SCRIPT.<scriptNum>.

Example:

gets the address in memory pointed to by entry 4 in the exports segment of SCRIPT.100.

(= heapPointer (ScriptID 100 4))

From the SCI Studio Help File:

ScriptID

heapPtr ScriptID(number scriptNum, number Index)

Returns the address in memory pointed to by entry Index in the exports segment of SCRIPT.<scriptNum>. Example (var heapPointer) = heapPointer ScriptID(100 4) /* gets the address in memory pointed to by entry 4 in the exports segment of SCRIPT.100.*/


Syntax


Parameters


Note


References

  1. From Phil Fortier's SCI Companion Documentation


Related Links