for(%a = 0; %a = isObject("Object"); %a++)
{
Object.delete();
}
That will not work for
3 reasons.
1. That is not the correct syntax for a
for loop.
A for loop is really just a while loop, but with a counter built in.
Example:
for(%a = 0; %a < 5; %a++)
{
}
is the same as:
%a=0;
while(%a < 5)
{
%a++;
}
The correct syntax is this:
1st expression sets the beginning counter variable. like
%a = 0; or
%oifaofje = 2938;, they both work.
The second expression is really an IF statement.
Example:
%a < 5
The loop will keep going as long as that statement returns true, but what you had;
%a = isObject("Object");, will not return a true or false, it will give a syntax error.
The third expression is what to do after each term in the loop.
The most commonly used ones are
%var++; and
%var--;.
2. The point of a loop is to do something multiple times.
If the object your affecting disappears every time the loop goes, if you try to delete a non-existent object, Blockland will throw it's hands up in dispair and give you a annoying error message saying "no such object!". If you're trying to delete multiple objects, you need to have the code delete a new object every time.
3. A string is not an object.
It will always return false.
You need to give it an actual object, like a player object or brick, for it to confirm it's an object.
No this post is not huge. It's just big enough.