Neopets - Stock Market Summary

By nungryscpro Last update Apr 11, 2009 — Installed 2,710 times.

Issue with stocks worth 0

in
Subscribe to Issue with stocks worth 0 2 posts, 2 voices



Sarah Collins User

The tally of which stocks you already own breaks down if you own any stocks worth 0, presumably because these don't appear in the master list. Adding this after line 95 (if (thisLink.href.match('ticker=')){) fixes it by skipping those:

var worth = thisLink.parentNode.parentNode.getElementsByTagName('td')[3].innerHTML;
if (worth == 0) {
// worthless stocks don't appear in the big list
continue;
}

 
nungryscpro Script's Author

I've never run into the problem of bankrupt stocks. I made the changes so that those stocks don't stop the script anymore. Thank you for the information and a fix.

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