Post: Removing all self endon("disconnect") statements
10-23-2015, 03:35 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I noticed that the line of code

    self endon("disconnect");


was pretty useless since it ends the current function when you disconnect. What purpose does it actually have? I don't see how I'm running into problems/freezing or whatever when I drop it so why do people include it all the time? Is it safe to remove it everywhere? Snail
(adsbygoogle = window.adsbygoogle || []).push({});
10-23-2015, 04:04 PM #2
Procyon
Gym leader
With a few functions it might make it so it will keep running the code, I've noticed this with a couple of script that it will keep running in another game than the one you activated it in.
10-24-2015, 11:46 AM #3
-Numb
You talkin to me?
Originally posted by BullyWiiPlaza View Post
I noticed that the line of code

    self endon("disconnect");


was pretty useless since it ends the current function when you disconnect. What purpose does it actually have? I don't see how I'm running into problems/freezing or whatever when I drop it so why do people include it all the time? Is it safe to remove it everywhere? Snail


They don't take much space so why not just keep them? Your script would probably still be working good if you remove them,
but it may be running alot of useless loops.. like if a player join and you give him admin so he starts alot of loops then he leave the game the loops would still be running

The following user thanked -Numb for this useful post:

BullyWiiPlaza

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo