Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
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 05-09-2009, 11:38 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Object functions...

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
obj.testfunct();
}

function 
obj.testfunct() {
  
player.chat "hi";

This does not work, you can't trigger your own functions onto other objects. However, you can do this and it works just fine:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
obj.testfunc();
}

obj.testfunc = function() {
  
player.chat "hi";


So for further example:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowControl("lalala") {
    
width height 50;
    
50;
    
profile GuiBlueWindowProfile;
  }
  
lalala.hi();
}

function 
lalala.hi() {
  
player.chat "hello";

This does not work. Neither does this:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowControl("lalala") {
    
width height 50;
    
50;
    
profile GuiBlueWindowProfile;
    
thiso.catchEvent(this"hi""LALA123");
  }
  
lalala.hi();
}

function 
LALA123() {
  
player.chat "hello";

This doesn't work either:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowControl("lalala") {
    
width height 50;
    
50;
    
profile GuiBlueWindowProfile;

    
this.hi = function() {
      
player.chat "hi";
    }
  }
  
lalala.hi();

However, this works fine:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowControl("lalala") {
    
width height 50;
    
50;
    
profile GuiBlueWindowProfile;
  }

  
lalala.hi = function() {
    
player.chat "hello";
  }

  
lalala.hi();

However, none of these problems occur serverside. So... yeah.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
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:37 PM.


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