Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-02-2017, 10:30 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko has a spectacular aura aboutKirko has a spectacular aura about
Anonymous functions don't delete

I noticed that these functions don't delete and are stored until I clearVars. Is this normal or should I be doing something to clear them? I tried to destroy the function after I use it but that didn't work.

PHP Code:
function onCreated() {
  
//this.clearVars(); // Will clear it

  
temp.fn = function(result) {
    
printf("Test: %d"result);
  };
  
test(55fn);

  
temp.fn.destroy();  // Function function_2107071_1.destroy not found at line 9

  
echo("Errors: " this.scriptErrors);
  echo(
"Useless crap: " getStringKeys("this.function").size()); // Goes up everyime script is updated
}


function 
test(abcallback) {
  (@ 
callback)(b);

Reply With Quote
 


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:54 AM.


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