Is it possible to get a reference to an object through return type?
How do i do that?
for instance i want to make a simple function -
object findemptycell()
{
object o;
int i=0;
while (true)
{
o = retobject(i);
if (o != null)
{
if (o.category ==PowerCell)
{
if (o.position.x != nan)
{
message("sdsd");
return o;
}
}
i++;
}else break;
}
}
But this does not work.
How do i do that?
for instance i want to make a simple function -
object findemptycell()
{
object o;
int i=0;
while (true)
{
o = retobject(i);
if (o != null)
{
if (o.category ==PowerCell)
{
if (o.position.x != nan)
{
message("sdsd");
return o;
}
}
i++;
}else break;
}
}
But this does not work.