Jump to content

Healp with Compile/Save Warning Invalid param '22'


meschael

Recommended Posts

EDIT: OK I have decided to use a global variable V22DoorOpenFlag and made the necessary changes. Everything seems fine but, if anyone does know how to access another scripts variable please do share.

 

I am having a problem with a Script warning when saving my script and need some help troubleshooting the cause. I am trying to read a local variable from another script and use it in a condition test. I don't realy want to use a global if I can avoid it.

I get the following warning when I save.

 

Warning: SCRIPTS: Param type '22' unimplemented in ScriptCompiler::StandardCompiler

 

scn V22ControlPodScript

short enableFlag
ref myDoor

begin onActivate
set myDoor to getLinkedRef

if (IsActionRef player == 1)				; activated directly by player
	if  enableFlag == 1						     ; controlpod is enabled
		playgroup Left 1					; pull handle down
		if myDoor.GetOpenState == 3    ; door is closed
			myDoor.SetOpenState 1		; close door
			else
			myDoor.SetOpenState 0        ; close door
		endif
	endif
endif

if (IsActionRef V22GearExitTermREF == 1)	; activated via wall terminal
		playgroup Left 1					          ; pull handle down
		
		if (myDoor.GetOpenState == 3) && (GetScriptVariable V22GearExitTermREF openFlag == 1)
			myDoor.SetOpenState 1				; open door
		endif
		if (myDoor.GetOpenState != 3) && (GetScriptVariable V22GearExitTermREF openFlag == 0)
			myDoor.SetOpenState 0  				; close door
		endif
endif

activate myDoor
end

Link to comment
Share on other sites

EDIT: OK I have decided to use a global variable V22DoorOpenFlag and made the necessary changes. Everything seems fine but, if anyone does know how to access another scripts variable please do share.

 

The one thing I do know regarding this is that for the script that you are trying to access the variable from, it needs to be running on a object with a persistent reference.

Link to comment
Share on other sites

The one thing I do know regarding this is that for the script that you are trying to access the variable from, it needs to be running on a object with a persistent reference.

To add to this...

 

That object needs an editor reference ID too and its that reference that you use in the script. Example:

 

Object: Switch (set to be persistent)

ObjectID: MySwitch01

Editor Reference ID: MySwitch01Ref

Script running on the switch:

scn MySwitch01Script
short SomeVar

 

In this case you can access the variable 'SomeVar' in another script by using this type of nomenclature:

 

Set MySwitch01Ref.SomeVar to 1

Link to comment
Share on other sites

Thanks guys. im gonna try this shortly and let you know. I did ensure both the switch and the terminal were persistent, and had a reference id entered into the term object but no refid on the switch. Ill let you know all this works. Last night I got it all working on global.

 

What supposed to happen is the wall terminal has 6 options:

 

Open Vault Door

Close Vault Door

Enable Control Pod 01

Disable Control Pod 01

Enable Control Pod 02

Disable Control Pod 02

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...