Ok, Im not too worried about the which statement right now, its just redundant code in my script for right now, and I have actually just taken it out, I probably wont use it, but I was playing around with it earlier. But anyways, I still cant seem to get this to work.. all I am still getting is "undefined" for my lyric.. I have ttried putting your code straight in, and playing around with it, cant seem to get it. Havent tried
anyeverything, but maybe you've got an idea to speed up the process?
quote:
in that case you do not need the which checking, seperate arrays, and all that other stuff at all. Just concat the lyrics array with your quotes array and be done with it. In other words, you're REALLY making it WAY hard on yourself ...
(and hence my initial suggestion to not alter my example routine at all but instead optimizing your code!).
Yes, I could very well do that, and the reason I did not was that if, going by my example again, I used lyrics, and jokes, they would be displayed different, by adding
in front of the lyric, and probably not adding anything to the joke. If i just had them all together, the jokes would also have
in front of them.. that is why they are seperate...
Also, I did try to change my initial code to match yours, but as far as I got it didnt work, and then you said something about using my code that I had already, so I changed it all back, lol. I think I am running around in circles.
quote:
That is example code. Code to show how you would use the above functions...
Yes, I realize that is just example code, I was just trying to clarify if that would go inside my function or not, because it did not seem so when you originally posted it.