for some reason when I set the j for loop to:
then mushClient freezes. I've also tried adding:
before var affObj = new Affliction(theList[j]); (in bold) and ended up in the same result.
for (j = 0; j < theList.length; j++)then mushClient freezes. I've also tried adding:
if (j < theList.length) {before var affObj = new Affliction(theList[j]); (in bold) and ended up in the same result.
function sort(list)
{
var listContents = world.getVariable(list);
if (listContents != "" && listContents != " ")
{
if (listContents.search(",") >= 0)
{
var theList = listContents.split(",");world.note("theList length is: " + theList.length);
world.setVariable(list,"");
for (i = 0;i <= 99; i++)
{
for (j = 0; j <= theList.length; j++)
{
var affObj = new Affliction(theList[j]);
if (i = affObj.order)
{
world.note(j);
addItem(list,affObj.name);
}
world.note("ending j loop");
}//end j loop
world.note("ending i loop");
}//end i loop
world.note("ending split if");
}
world.note("ending check empty");
}
}