PHP Code:
NPC1:
function onCreated()
{
echo( getArray() ); // Echos 1,2,3
}
public function getArray()
{
temp.var = {1,2,3};
return temp.var;
}
PHP Code:
NPC2:
function onCreated()
{
echo( NPC1.getArray()) ; // Echos 0
}
Inconsistency in return due to temp variables over external function.
Temp Fix:
PHP Code:
public function getArray()
{
temp.var = {1,2,3};
this.toreturn = temp.var;
return this.toreturn;
}