Beyond the script editor line: Is it bad practice?
#6
Taking from Punk's earlier example, you may see how easy it is to read and debug the code if formatted with line breaks:
# Background Tone (Red)
@backgroundtone[bgt].viewport.tone.red =
(@backgroundtone[bgt].viewport.tone.red *
(@backgroundtone_c[bgt][3] - 1) +
@backgroundtone_c[bgt][1].red) /
@backgroundtone_c[bgt][3]
# Background Tone (Green)
@backgroundtone[bgt].viewport.tone.green =
(@backgroundtone[bgt].viewport.tone.green *
(@backgroundtone_c[bgt][3] - 1) +
@backgroundtone_c[bgt][1].green) /
@backgroundtone_c[bgt][3]
# Background Tone (Blue)
@backgroundtone[bgt].viewport.tone.blue =
(@backgroundtone[bgt].viewport.tone.blue *
(@backgroundtone_c[bgt][3] - 1) +
@backgroundtone_c[bgt][1].blue) /
@backgroundtone_c[bgt][3]
# Background Tone (Gray)
@backgroundtone[bgt].viewport.tone.gray =
(@backgroundtone[bgt].viewport.tone.gray *
(@backgroundtone_c[bgt][3] - 1) +
@backgroundtone_c[bgt][1].gray) /
@backgroundtone_c[bgt][3]
Yeah... I did the colors too.
Reply }


Messages In This Thread
Beyond the script editor line: Is it bad practice? - by DerVVulfman - 05-22-2009, 05:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   RPGmXP Editor Hotkeys MechanicalPen 2 6,116 10-06-2013, 12:02 AM
Last Post: MechanicalPen
   Pause Script Feature Requests? PK8 11 17,627 05-25-2009, 11:07 AM
Last Post: Kain Nobel



Users browsing this thread: 2 Guest(s)