Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Array External Return (https://forums.graalonline.com/forums/showthread.php?t=66826)

JustBreathe 06-22-2006 11:43 AM

Array External Return
 
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;
  } 


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

Quote:

Originally Posted by Stefan
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

Quote:

Originally Posted by Stefan
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

Quote:

Originally Posted by Stefan
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.


All times are GMT +2. The time now is 09:03 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.