View Single Post
  #8  
Old 02-01-2009, 12:48 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Interesting.

This does NOT work:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  new 
GuiWindowCtrl("Debug") {
    
this.testFunc = function () {
      echo(
"Sup?");
    };
    
    
this.testFunc();
  }

This works...
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  new 
GuiWindowCtrl("Debug") {
    
this.testFunc = public function () {
      echo(
"Sup?");
    };
    
    
this.testFunc();
  }

... but still gives the error GraalScript: Function Debug.testFunc not found in script of Weapon Ziro/Debug

This works...
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
this.testFunc = public function () {
    echo(
"Sup?");
  };
  
  
this.testFunc();

... but still gives the error GraalScript: Function testFunc not found in script of Weapon Ziro/Debug

This works...
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
this.testFunc = function () {
    echo(
"Sup?");
  };
  
  
this.testFunc();

... without giving an error.

__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote