Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Announcements (https://forums.graalonline.com/forums/forumdisplay.php?f=240)
-   -   NPCServer updates (https://forums.graalonline.com/forums/showthread.php?t=74042)

Inverness 05-22-2007 01:46 AM

I already know points are left behind but I meant the object itself. If it wasn't destroyed on loss of references it could still function.

Twinny 05-22-2007 08:15 AM

Hmm...i doubt gscript has a garbage collector. Make a random global TStaticVar(), remove the code that made it and check up on it every now and then ^^.

zokemon 05-22-2007 11:45 AM

Fun stuff!
Good job :)

Admins 05-28-2007 11:20 AM

Quote:

Originally Posted by Twinny (Post 1310554)
Hmm...i doubt gscript has a garbage collector. Make a random global TStaticVar(), remove the code that made it and check up on it every now and then ^^.

There is, it's quite accurate, checking recursive links.

About the "not accessible" error: I have fixed it, will upload new npcservers soon.

About npc rights problems: The problem is that people write their account name wrong (wrong case), so the npcserver is not accepting it; to fix it write it correctly e.g. Shadow87 instead of shadow87, I will also upload new npcservers soon.

Twinny 02-26-2008 12:53 PM

Reviving thread here but are variable functions available on the client yet? I tried to make one but it didn't work :cry:

Tolnaftate2004 02-26-2008 06:08 PM

Quote:

Originally Posted by Twinny (Post 1376644)
Reviving thread here but are variable functions available on the client yet? I tried to make one but it didn't work :cry:

They work (at least in simple cases):

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
this.test_func = function () {
    echo(
"I win!");
  };

  
this.test_func();


I've seen the functionality break down within with() blocks.

Inverness 02-27-2008 01:07 AM

Quote:

Originally Posted by Tolnaftate2004 (Post 1376660)
I've seen the functionality break down within with() blocks.

If you return in a with() block crazy stuff happens.

Tolnaftate2004 02-27-2008 04:10 AM

Quote:

Originally Posted by Inverness (Post 1376713)
If you return in a with() block crazy stuff happens.

This is true, but I meant that dynamic functions are treated more like inline functions.

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
temp.var = new TStaticVar();
  
with (temp.var) {
    
this.test_func = function () {
      echo(
"I win!");
    };
  }

  
temp.var.test_func(); // Doesn't work



xAndrewx 02-27-2008 10:07 AM

strange, no idea but would ths work


PHP Code:

temp.var.test_func = function() 
{
  echo(
"I Win!");



Tolnaftate2004 02-27-2008 10:37 AM

Quote:

Originally Posted by xAndrewx (Post 1376764)
strange, no idea but would ths work


PHP Code:

temp.var.test_func = function() 
{
  echo(
"I Win!");



Yes, granted they are called & defined in the same scope (as far as I can tell).


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

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