Hey Community,
I am trying to simplify the following code:
My idea was to create a local for substrings in the variable "Scenario" and then loop:
Yet, this gives me the following error
... which does not make sense to me.
What am I doing wrong?
I am trying to simplify the following code:
Code:
su SA_NewNum if strpos(Scenarios, "Irri_Normal_MoreOwn") su SA_NewNum if strpos(Scenarios, "Irri_Extreme_MoreOwn") su SA_NewNum if strpos(Scenarios, "Irri_Normal_MoreSell") su SA_NewNum if strpos(Scenarios, "Irri_Extreme_MoreSell") su SA_NewNum if strpos(Scenarios, "Irri_Normal_MoreNeighbor") su SA_NewNum if strpos(Scenarios, "Irri_Extreme_MoreNeighbor") su SA_NewNum if strpos(Scenarios, "Irri_Normal_Equal") su SA_NewNum if strpos(Scenarios, "Irri_Extreme_Equal") su SA_NewNum if strpos(Scenarios, "Irri_Normal_Less") su SA_NewNum if strpos(Scenarios, "Irri_Extreme_Less")
Code:
local actions "Irri_Normal_MoreOwn Irri_Extreme_MoreOwn Irri_Normal_MoreSell Irri_Extreme_MoreSell Irri_Normal_MoreNeighbor Irri_Extreme_MoreNeighbor Irri_Normal_Equal Irri_Extreme_Equal Irri_Normal_Less Irri_Extreme_Less"
foreach l of local actions {
su SA_NewNum if strpos(Scenarios, `l')
}
Irri_Normal_MoreOwn not found
r(111);
r(111);
What am I doing wrong?

Comment