PDA

View Full Version : Array External Return


JustBreathe
06-22-2006, 11:43 AM
NPC1:
function onCreated()
{
echo( getArray() ); // Echos 1,2,3
}

public function getArray()
{
temp.var = {1,2,3};
return temp.var;
}



NPC2:
function onCreated()
{
echo( NPC1.getArray()) ; // Echos 0
}


Inconsistency in return due to temp variables over external function.

Temp Fix:


public function getArray()
{
temp.var = {1,2,3};
this.toreturn = temp.var;
return this.toreturn;
}

Admins
06-22-2006, 02:42 PM
Yes I know that problem, it can actually crash the server/client. It is already fixed, but the new npcserver is not uploaded yet, also a new client version will still take some weeks. On which server do you need to use it ?

JustBreathe
06-22-2006, 02:43 PM
Yes I know that problem, it can actually crash the server/client. It is already fixed, but the new npcserver is not uploaded yet, also a new client version will still take some weeks. On which server do you need to use it ?

Relic: playerworld78

Admins
06-22-2006, 08:21 PM
When you restart your npcserver then it should be fixed, please tell me after testing.

JustBreathe
06-22-2006, 08:27 PM
When you restart your npcserver then it should be fixed, please tell me after testing.
NPC-Server Restarted.
GServer wasn't.

The problem persists.

Admins
06-23-2006, 12:45 AM
Well I have uploaded the new version just a few minutes after I posted this, so eventually try again :)

JustBreathe
06-23-2006, 09:33 AM
Well I have uploaded the new version just a few minutes after I posted this, so eventually try again :)
It has been fixed in the last updates. Thanks.