07-09-2002, 03:54 AM
This poor loser needs sleep, and some help! I have two pretty long scripts - one a drop down menu; the other a Quote of the Day script. Both begin with 'function land(ref, target)' along with some other matching code in the two scripts. Before I start trying to combine them so they don't conflict, is there any quick and dirty advice for me? Other than 'go to bed and start again in the morning?' :) MANY THANKS.
07-09-2002, 09:47 AM
If the functions you mentioned are exactly identical you could delete one; otherwise, change the name of one slightly, and don't forget to alter the function calls in the script accordingly!
It would be a great help if you could show the code how you implemented it.
Last note: go to bed and start again in the morning... :D
07-09-2002, 03:52 PM
If you editor doesnt have one, toss it and get a real editor.
append 'menu_' to all the drop down menu function names and append 'day_quote_' to the quote of the day function names.
I am guessing if more then one function is the same, someone forgot what problems this causes? And I am guessing that there would be more scripts out there like this that will cause future confilcts if added.
Appending a unique id to the front of the functions should make them not conflict.
you could use 'a707-4123_' for that matter, but using something that makes more sense to what the functions are used for will help in maintenance. Just make sure that it 'IS' unique.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.