Can I clean up the global script?

Started by quixotecoyote, Fri 14/09/2007 07:41:46

Previous topic - Next topic

quixotecoyote

My global script is getting hard to read with character and inventory sections coming in random order.  Would it hurt anything if I cut and pasted the different sections around to group things together and make it easier to read?

Lionmonkey

No, but you have to do that very carefull. Cut and paste whole parametres with their functions, without forgetting anything, or else there will be many buggy loose ends.
,

Khris

Geez, Lionmonkey, "whole parametres with their functions"?
He was talking about sections, a simple "No" would've been enough... :=

Lionmonkey

Quote from: KhrisMUC on Fri 14/09/2007 10:31:10
Geez, Lionmonkey, "whole parametres with their functions"?
He was talking about sections, a simple "No" would've been enough... :=

I think you forgot to read my sig.
,

Akatosh

A rant about a MMOG I never, ever heard about, and "Cthulhu Cult" with a lot of arrows on it?

*scratches head in confusion*

Ashen

Keep it on topic or take it to PM, please guys.
Lionmonkey, 'whole parametres with their functions' is a little unclear - what are you talking about?

To answer the question: provided you move the whole function, and don't miss out and closing braces - } - or semi-colons - ; - from the end of lines (which I guess is what Lionmonkey meant) you should be OK. Just remember that functions and variables can't be called in the script before their declarations. If you're only going to be moving GUI Control functions or Character interactions, you probably don't have to worry about that - they're not called from script, so it doesn't overly matter where they are. If you've got your own custom functions or variables, however, you'll need to keep it in mind. (If you use your own function/variable in a Character interaction or GUI script, don't move the declaration below the Character/GUI script.)
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk