it is not clear how you call the function. So what are the values x1 and x2? We need a complete code.
!?BG1;
Also !!BG:E?y53; (which will trigger after every action!)
Needs additional checks to prevent a wrong return of creature number. If it returns -1 you will have wrong number of monster and will get ERM error
(This post was last modified: 08.01.2020 15:45 by PerryR.)