Archived Comments (locked)

in
Subscribe to Archived Comments 11 posts, 6 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
ruimams Scriptwright

I think that I found an error on line 40
var lastupdatecheck = new Date(lastupdatecheck).getTime();
var interval = (today - lastupdatecheck) / one_day;

should be var lastupdatecheck2 = new Date(lastupdatecheck).getTime();
var interval = (today - lastupdatecheck2) / one_day;

(I gave the name "lastupdatecheck2" but could be anything else)

Sorry for my bad english =/

 
sizzlemctwizzle Scriptwright

83 people haven't listened hahaha lol

 
psycadelik Script's Author

Thanks Phanboy, I guess I forgot the configuration values can't be dates. Code updated.

 
Phanboy Scriptwright

From FireFox error console: lastupdatecheck.getTime(), function getTime() does not exist. I've figure out a way around this though, since you already have the date variable as a string, you can do var lastupdatecheck = new Date(lastupdatecheck).getTime(); this should work better because you are converting it back into a Date() object. Your code before was trying to call .getTime() on a string object! lolz ;3

 
psycadelik Script's Author

For a concrete example, look at Video Focus 1.0.4, it's the same auto-update code.

 
psycadelik Script's Author

Dink, I think I've made the instruction as user-friendly as possible..

Copy & paste the source code into your own script, change what needs to be changed (6 parameters in total, dont forget to make your version_holder file) and call the CheckForUpdate function at an appropriate place in your script.

 
psycadelik Script's Author

And nobody can modify that file but me, you can set that in the document options on Google Docs.

 
Dink Scriptwright

I think alot of people like myself need more detailed instructions on how to use this code...

 
psycadelik Script's Author

You can use your own file from wherever, just make sure the version line is matched correctly.

 
Phanboy Scriptwright

nice, i'll have to try this. now do i HAVE to use your google document or can i create my own? call me paranoid, but it's weird to have someone else in control of your variables and whatnot.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel