function DNASearch(%pos,%dna,%bot)
{
InitContainerRadiusSearch(%pos, 5, $TypeMasks::PlayerObjectType);
while(%hit = containerSearchNext())
{
if(%hit.getClassName() $= "Player")
{
announce(%hit.getClassName());
announce(%dna);
announce(%hit.dna);
if(%hit.dna !$= "" && %dna !$= "")
{
if(%hit.dna $= %dna)
%bot.dna = %dna;
else
%bot.dna = "[NONE]";
}
}
}
}
Everytime i run this when the bot is generated, it runs only once.
However, whenever I run elsewise, eval or console, it functions perfectly.