2 things.
1)
I would change the function call with:
temp = FindTroopLeader(troop)
temp\checked = true
where temp is declared as temp.troop
2)
I would distinguish between type structure name and type pointer name; in your example, troop is the type structure name, and also the type pointer name, which I find a bit confusing.
So, make your type structure always with t_ suffix, for example:
type t_troop
field...
end type
global troop.t_troop
Hope this helps,
Sergio.
1)
I would change the function call with:
temp = FindTroopLeader(troop)
temp\checked = true
where temp is declared as temp.troop
2)
I would distinguish between type structure name and type pointer name; in your example, troop is the type structure name, and also the type pointer name, which I find a bit confusing.
So, make your type structure always with t_ suffix, for example:
type t_troop
field...
end type
global troop.t_troop
Hope this helps,
Sergio.