Auto-translated
Are you sure that the numbering starts from one? Shouldn't it start from zero?
New here? I'm Roha — want a quick tour?
You can choose from a list, for example, 8 names, and select one for the specific case (example: blockedTavern[3]), but is it possible to exclude a specific name? This is exactly what I need – to select all 8 names and then exclude, for example, the 3rd one.
It still doesn't work. It says "attempt to call a nil value".
Either put it in the array at index i, or simply iterate through the first two elements of the array first, and then through the rest. Don't compare with nil, but with true. Or, as I think, still with false, but then for equality, and not the other way around.
if IsObjectExists ('mon')==true then, sorry, here's my advice - but there's an error in the IsObjectExists function - the letter S is required at the end. If there is no monster, it outputs nil (exactly nil, and not all sorts of true and false).
(It happens :smile04:, that's why I advised using a script editor to check).
Oligarch, in your case, you need
if IsObjectExists ('mon')==nil ...
Use prints - it's the perfect option for catching errors
print (IsObjectExists('mon')); - and look in the console