Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-22-2006, 11:43 AM
JustBreathe JustBreathe is offline
Registered User
Join Date: Jun 2006
Posts: 59
JustBreathe is on a distinguished road
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;
  } 
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:52 AM.


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