The game doesn't seem to like the "C1" or similar node ID generated in the following code. I've tried quite a few variations but can't make it work.
Strangely
Code: Select all
(setq destinationGate (@ (sysGetStargates node) 0))
Invalid nodeID [("C1")] ### (sysGetStargates node) ###
Comment out setq destinationGate and the ObjGateTo line give the following error
Identifier expected [("C1")] ### (objGateTo gPlayership node destinationGate 36870) ###
Setting node to "C1" in on the debug screen makes it work with "Inbound" as the GateID.
Which leads me to think that node/"C1" isn't a nodeID here but maybe text?
Or is scrGetListEntry messing something up or possibly the list generating code for the dockscreen or custompicker?
And quite possibly it's because I don't have a clue code-wise!
Anyone got any idea what's happening? I've used ObjGateTo with variables before successfully but can't make it work here.
TIA.
Relevant code:
Code: Select all
<Dockscreen UNID="&dsD789GodTravelGalaxyDockscreen;"
name= "Galaxy Travel"
type= "customPicker"
backgroundID= "&rsItemListScreen;"
nestedScreen= "true"
>
<List
rowHeight="32"
>
(block (galaxyTravelList systemList nameList)
(setq systemList (sysGetNodes))
(enum systemList nameList (setq galaxyTravelList (lnkAppend galaxyTravelList (sysGetProperty nameList 'name))))
)
</List>
<Panes>
<Default>
<OnPaneInit>
(block Nil
(scrSetDesc gScreen "Print this")
);block
</OnPaneInit>
;need to set cursor to current system
<Actions>
<Action name="Travel To This System" key="T" default="1" >
(block Nil
(setq listEntry (scrGetListEntry gScreen))
(setq node (filter (sysGetNodes) listSystem (eq (sysGetName listSystem) listEntry)))
(setq destinationGate (@ (sysGetStargates node) 0))
(objGateTo gPlayership node destinationGate &efStargateOut;)
;(objGateTo gPlayership "C1" "Inbound" &efStargateOut;) this works
(scrExitScreen gScreen 'forceUndock)
)