Spherical forums

User-Made => Libraries => Library Support => Topic started by: Vakinox on June 18, 2013, 11:01:05 pm

Title: [persist.js] Does anyone happen to have a copy?
Post by: Vakinox on June 18, 2013, 11:01:05 pm
I forgot his name, but tsengu or something developed this pretty neat script called "persist.js" which helped alot with programming variables and stuff.

It be cool if someone kept a backup. I thought I did, but I've seem to have lost it.
Title: Re: Does anyone happen to have a copy of Persist.js?
Post by: Fat Cerberus on June 19, 2013, 12:37:23 am
Sure, I'm actually using that for Spectacles right now! :)
Title: Re: Does anyone happen to have a copy of Persist.js?
Post by: DaVince on June 19, 2013, 06:50:27 am

I forgot his name, but tsengu or something developed this pretty neat script called "persist.js" which helped alot with programming variables and stuff.

I think you might be mixing in a bit too much of my site name in there (tengu)... ;) It was tunginobi!
Title: Re: Does anyone happen to have a copy of Persist.js?
Post by: Vakinox on June 19, 2013, 06:53:00 am
Lol, can't help it, have bad memory problems. You right.
Title: Re: Does anyone happen to have a copy of Persist.js?
Post by: N E O on June 19, 2013, 05:08:40 pm
There's also the restored persist.js wiki article (http://wiki.spheredev.org/Script:Persist.js) :)

The only difference between that and Lord English's version is an Abort call when logging errors.
Title: Re: Does anyone happen to have a copy of Persist.js?
Post by: Fat Cerberus on June 19, 2013, 10:32:09 pm

There's also the restored persist.js wiki article (http://wiki.spheredev.org/Script:Persist.js) :)

The only difference between that and Lord English's version is an Abort call when logging errors.


Haha, oops.  I forgot about that, I added that Abort call myself.  When something went wrong Sphere tended to give the location of the error right at the logging call (yes, instead of logging the error it just crashed outright! persist.js is a great tool, but extremely hackish, you have to be prepared for weird stuff like this), but the real problem was that the resulting error was truncated, so I had to manually abort to see the entire message.
Title: Re: Does anyone happen to have a copy of Persist.js?
Post by: Vakinox on June 19, 2013, 11:20:36 pm
Yeah, the recovered scripts might not have Tungi's final edits.
I remember pointing something out a long time ago that was wrong with the script causing it to crash randomly and Tungi fixed it.
What that problem was, I can't recall.

Were you able to figure out the problem?
Title: Re: Does anyone happen to have a copy of Persist.js?
Post by: Fat Cerberus on June 20, 2013, 12:04:02 am
No, didn't have the patience.  I just stuck an Abort call in there as a quick workaround and called it a day.  9 times out of 10 it was a syntax error in my own code as the root cause, but for some reason instead of it showing the location of the error, persist.js was catching the exception, and when attempting to log it, this caused a really strange "Invalid string" error, which soft-crashed the engine.  Here's the thing: The invalid string error also had the offending line of code in it, but the logging crash only showed a truncated version of the error.  Adding an explicit Abort allowed me to see the whole error description.