Difference between revisions of "Talk:GetSourceModIndex"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Irwiss
imported>DragoonWraith
Line 16: Line 16:
<dd>--[[User:Qazaaq|Qazaaq]] 07:54, 27 December 2008 (EST)</dl>
<dd>--[[User:Qazaaq|Qazaaq]] 07:54, 27 December 2008 (EST)</dl>
::Ah, I assumed object:ref is the same as a reference. Guess I have some reading to do. Might explain some other odd things too, thanks. --[[User:Irwiss|Irwiss]] 11:50, 27 December 2008 (EST)
::Ah, I assumed object:ref is the same as a reference. Guess I have some reading to do. Might explain some other odd things too, thanks. --[[User:Irwiss|Irwiss]] 11:50, 27 December 2008 (EST)
:::Yes, unfortunately this distinction between object and reference is one of the most difficult things for the Wiki to explain, because it's crucial to understanding '''most''' of modding, but at the same time it's basic and therefore out of place to actually put it on every page. Figuring out how to present it to people has been difficult for a long time.
:::What we had hoped you would have seen by the time you got here was the [[Modding Terminology]] page, which explains things. If you can give us any ideas as to where that should have been linked from so that you might have seen it, it would be massively appreciated.
:::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 12:44, 27 December 2008 (EST)

Revision as of 13:44, 27 December 2008

Possible bug

Set iItemBaseIndex to GetSourceModIndex refItem ; Returns expected value
Set iItemBaseIndex to refItem.GetSourceModIndex ; Returns -1

Note that the first line will return the correct value. The second line will return -1.

It could be either a bug in OBSE v16 or me misunderstanding the function. Hopefully will spare you some debugging time. --Irwiss 04:58, 27 December 2008 (EST)

Use this if refItem contains an object ID:
Set iItemBaseIndex to GetSourceModIndex refItem
and use this if refItem contains a reference ID:
Set iItemBaseIndex to refItem.GetSourceModIndex
If one of those doesn't work you should post it in the OBSE thread.
--Qazaaq 07:54, 27 December 2008 (EST)
Ah, I assumed object:ref is the same as a reference. Guess I have some reading to do. Might explain some other odd things too, thanks. --Irwiss 11:50, 27 December 2008 (EST)
Yes, unfortunately this distinction between object and reference is one of the most difficult things for the Wiki to explain, because it's crucial to understanding most of modding, but at the same time it's basic and therefore out of place to actually put it on every page. Figuring out how to present it to people has been difficult for a long time.
What we had hoped you would have seen by the time you got here was the Modding Terminology page, which explains things. If you can give us any ideas as to where that should have been linked from so that you might have seen it, it would be massively appreciated.
Dragoon Wraith TALK 12:44, 27 December 2008 (EST)