I have looked through some of the Random Battle Demos, Libraries and I hardly understand any of them.
The variables and Encounter would work (if to be tested)
I just don't understand the use of For(), Bump() and to check if an area is occupied such as :
area/Battlefield/var/Occupied
I've tried quite a few times. I think i'm closest with this one ,2 errors and 1 warning, though:
//-------------------Initiate Battle------\\
mob
var{inbattle;Tail;Hand;Sync;HP}
Bump(mob/O)//is this the correct use of Bump()?
Encounter()//call the Encounter()
mob/proc
Encounter()
for(var/area/BattleField/V)
//^ Here is the error
if(V.Occupied==1)
//I know if should use if(!"var"), but I'll bullet-proof it later.
..()
//the ..() is here just for now.
//----------------------Atoms----------------\\
area
Battlefield
var/Occupied //varible defined.
Errors :
V:undefined type:V
V.Occupied:undefined var
warning: variable defined but not used.
To avoid these problems, you're better off not using caps here, and just sticking to an all lowercase naming convention.
Lummox JR