Access Array from Another Script

Post » Thu Feb 13, 2014 6:12 am

I have a quest scrip that has an array of NPCs and I am trying to change the array through a spell script but it does not work. Below is a rough outline of the script.

When I set stage to 1 and display the array content it list "no name" for all.

scn questscriptarray_var npcsref npcshort ishort stagebegin Gamemode      ....    if (Stage == 1)       Set Stage to 0       Set i to 0        while(i < 5)            let npc := npcs[i]               MessageEX "[%g] %n"  i npc                        set i to i + 1                    loop    endif      ...end
scn spellscriptref npcshort ibegin ScriptEffectStart    let  npc := this    .... ; find best insert location     let questscript.npcs[i] := npc    ...    end
User avatar
Peter lopez
 
Posts: 3383
Joined: Mon Sep 10, 2007 5:55 pm

Post » Thu Feb 13, 2014 5:29 am

Found the problem. It was a mistake in the code got it fixed.

User avatar
Stace
 
Posts: 3455
Joined: Sun Jun 18, 2006 2:52 pm


Return to IV - Oblivion