"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
I'm not sure, but it's possible that that number you got back IS the unid for a phobos. You seem to have some confusion going on between unid functions and extant object functions. I took a stab at cleaning up your code, but I haven't had a chance to test it yet:
<Action name="filterStrer" default="1">
; You need to declare variables or they all become global
(block (matchingShipUnids filterStr allPlayerShipUnids)
(setq filterStr (scrGetInputText gScreen))
; No idea what this is about
(objSetData gSource "shpfilter1" true)
; You had in here (setq list something), which
; was overriding a core function (list).
; Get list of playership unids
(setq allPlayerShipUnids (typfind "s +isPlayerClass:true"))
; Filter out all the ones where filterStr not in name
; (filter list i (func i)) -> all items in list where
; (func i) is true
(setq matchingShipUnids (filter allPlayerShipUnids unid
(if (not (eq nil ; strFind != nil means string found
(strFind (typGetDataField unid name) filterStr)
)) true)
))
; Not sure what you're doing here, but if you want to
; remove an item from a list and keep the item, you
; have to use item first because lnkRemove returns the
; whole list
(dbgLog "List 1: " matchingShipUnids)
(dbgLog "Item 1: " (item matchingShipUnids 0))
(lnkRemove matchingShipUnids 0 nil)
(dbgLog "Item 2: " (item matchingShipUnids 0))
(lnkRemove matchingShipUnids 0 nil)
(dbgLog "Item 3: " (item matchingShipUnids 0))
(lnkRemove matchingShipUnids 0 nil)
(dbgLog "List 2: " matchingShipUnids )
; I guess you're using shpfilter as a data source for
; dsShipBuy?
(objSetData gSource "shpfilter" matchingShipUnids)
(scrShowScreen gScreen &dsShipbuy; "Default")
(dbgLog matchingShipUnids)
)
</Action>
Last edited by Star Weaver on Wed Dec 15, 2010 3:37 pm, edited 1 time in total.
as you can see by the time stamp i ain't (sorry wolfy ) doing anything on it tonight
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"