I tried using a preset with a script value equal to the var used but I cant get it to go in right it always shows up as the parameter not the script value of the preset.
ItemRefineOptions:FunctionReturnType:IntegerParametersPlayer=0<Integer>Window<Itm_Win_Desc>Index=0<Integer>GrammarText:ItemRefine(Player,Window,Index)HintText:(None)CustomScriptCodeLocalVariablesActionsGeneral-Switch(Actions)dependingonWindowCasesGeneral-If(Bag1)ActionsGeneral-ReturnBagItems[0][Player][Index].Refine
General - If (Bag 2)
Actions
General - Return Bag Items[1][Player][Index].Refine
General - If (Bag 3)
Actions
General - Return Bag Items[2][Player][Index].Refine
General - If (Bag 4)
Actions
General - Return Bag Items[3][Player][Index].Refine
General - If (Bag 5)
Actions
General - Return Bag Items[4][Player][Index].Refine
General - If (Cmb/Brk)
Actions
General - Return Cmb_Brk Items[Player][Index].Refine
General - If (Craft)
Actions
General - Return Craft Items[Player][Index].Refine
General - If (Equipment Window)
Actions
General - Return Equipped Items[Player][Index].Refine
General - If (Pickup)
Actions
General - Return Pick Item[Player].Refine
General - If (Storage)
Actions
General - Return Storage Items[Player][Index].Refine
Default
General - Return 0
Basically I want that .Refine to be based on a parameter rather than having to create a diff function for each .Member.
Tell me there's a way to do this? I tried custom code but it wasn't working either.
Make another function that takes a record and a preset as a parameter and then returns whatever field is specified by the preset. There is no way to programmatically select a field from a record because records are basically C structs, not Lua-like tables and thus have no reflection capabilities.
Yeah I'm not a programmer, you lost me there. But everything I've tried looking like what you said isn't working so I'm just going to have to make a different function for each .member. Honestly it works it just sucks having to make 8 functions with 10 if then else statements in each. Seeing as how it would seem galaxy doesnt have real switches and using the built in switch generates one of those big ugly variables.
Thanks though,
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I tried using a preset with a script value equal to the var used but I cant get it to go in right it always shows up as the parameter not the script value of the preset.
Basically I want that .Refine to be based on a parameter rather than having to create a diff function for each .Member.
Tell me there's a way to do this? I tried custom code but it wasn't working either.
Make another function that takes a record and a preset as a parameter and then returns whatever field is specified by the preset. There is no way to programmatically select a field from a record because records are basically C structs, not Lua-like tables and thus have no reflection capabilities.
@RileyStarcraft: Go
Yeah I'm not a programmer, you lost me there. But everything I've tried looking like what you said isn't working so I'm just going to have to make a different function for each .member. Honestly it works it just sucks having to make 8 functions with 10 if then else statements in each. Seeing as how it would seem galaxy doesnt have real switches and using the built in switch generates one of those big ugly variables.
Thanks though,