[ DEV ] InfinityScript Suggestions

InfinityScript plugins for dedicated servers.
User avatar
~Lambder
TeknoSheep
Posts: 448
Joined: Thu Apr 11, 2013 5:40 pm
Location: Meadow.
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby ~Lambder » Sun Feb 07, 2016 3:52 pm

Boboo wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

This way, we can do so much more stuff. Too bad it needs some kind of hooking and possibly changing the tekno source.


The destructor was working actually when I used it...

Code: Select all

~<Constructor> {...}


How many versions ago was that? lul.

Hm, lemme check on 3.11.
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

Re: [ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Sun Feb 07, 2016 5:52 pm

It's quite easy to patch IS to do that.
User avatar
~Lambder
TeknoSheep
Posts: 448
Joined: Thu Apr 11, 2013 5:40 pm
Location: Meadow.
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby ~Lambder » Sun Feb 07, 2016 6:40 pm

Actually that works now. I guess printing to the console wasn't the best test to see if it worked or not >.> xD



cubrr
TeknoMan
TeknoMan
Posts: 138
Joined: Sun Oct 05, 2014 12:54 am

Re: [ DEV ] InfinityScript Suggestions

Postby cubrr » Sun Feb 07, 2016 7:44 pm

Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

Re: [ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Sun Feb 07, 2016 8:05 pm

One thing I have noticed however is that IS uses some methods that MW3 doesn't actually have.
cubrr
TeknoMan
TeknoMan
Posts: 138
Joined: Sun Oct 05, 2014 12:54 am

Re: [ DEV ] InfinityScript Suggestions

Postby cubrr » Sun Feb 07, 2016 8:07 pm

c4271605 wrote:One thing I have noticed however is that IS uses some methods that MW3 doesn't actually have.

And these are?
User avatar
~Lambder
TeknoSheep
Posts: 448
Joined: Thu Apr 11, 2013 5:40 pm
Location: Meadow.
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby ~Lambder » Sun Feb 07, 2016 8:43 pm

cubrr wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.


We don't really need that when we have a working destructor, mate.



cubrr
TeknoMan
TeknoMan
Posts: 138
Joined: Sun Oct 05, 2014 12:54 am

Re: [ DEV ] InfinityScript Suggestions

Postby cubrr » Sun Feb 07, 2016 9:23 pm

Lambder wrote:
cubrr wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.


We don't really need that when we have a working destructor, mate.

The finalizer only gets called when the garbage collector calls it. That can be literally at any arbitrary time after the object is deemed to be valid for collection. OnScriptUnload gets called exactly when the script is being unloaded.
User avatar
~Lambder
TeknoSheep
Posts: 448
Joined: Thu Apr 11, 2013 5:40 pm
Location: Meadow.
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby ~Lambder » Sun Feb 07, 2016 9:44 pm

cubrr wrote:
Lambder wrote:
cubrr wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.


We don't really need that when we have a working destructor, mate.

The finalizer only gets called when the garbage collector calls it. That can be literally at any arbitrary time after the object is deemed to be valid for collection. OnScriptUnload gets called exactly when the script is being unloaded.


Well, I'm pretty sure the destructor won't be called before the OnUnload function anyways.
Nothing to change here.



User avatar
Boboo
TeknoDev
Posts: 145
Joined: Thu Jul 23, 2015 3:41 pm

Re: [ DEV ] InfinityScript Suggestions

Postby Boboo » Sun Feb 07, 2016 10:12 pm

Lambder wrote:Actually that works now. I guess printing to the console wasn't the best test to see if it worked or not >.> xD


Look at this scrub... :-P
Image

Return to “InfinityScript”

Who is online

Users browsing this forum: No registered users and 7 guests