FRIENDLY and ENEMY are constants, not commands/functions for clarification. A simple explination is a follows
you are aware that there are four independent "sides"
Civilian
East
West
Resistance.
FRIENDLY and ENEMY are basically two new sides.. FRIENDLY is hostile towards nobody (i.e a secondary civilian group) and ENEMY is hostile towards EVERYBODY.
FRIENDLY and ENEMY being constants not functions, means that you cant simply use ?(side bob == enemy frank) to check if bob is an enemy of frank.
A makeshift soloution for this, is to make three dummy soldiers out in the ocean on one of your maps. one east, one west, one resistance. Place them within one metre of eachother.
Create two arrays, one with:
warray = [ressoldier,wessoldier]
the other
earray = [ressoldier,eassoldier]
where ressoldier is the name of the resistance soldier, etc.
Then use the countenemy function.
eastflag = false
westflag = false
?((ressoldier countenemy warray) > 0):westflag = true
?((ressoldier countenemy earray) > 0):eastflag = true
Now, if resistance is hostile towards east, eastflag will be TRUE
and if resistance is hostile towards west, westflag will be true.
Hope this helps
(I have no idea why you would need to work this out mid-script seeing as surely you are the one who made the mission? and you could just look to see what the mission says?)
If you are writing a generic script for distribution to be used in other missions however, you wouldnt be able to ask the mission creater to place three dummy units.. so I would suggest using CREATEUNIT.
Cheers
Adam