I'm not a lua scripter, but right off the bat I noticed some spelling problems.
Code:
-- --------------------------------------------
-- Color Gradient function for player locatiion
-- --------------------------------------------
--function PL_Gradient(p_color)
-- if color_up == true and p1_red > 15 then
-- p1_red = p1_red - 20
-- p1_blue = p1_blue + 20
-- p1_green = p1_green + 20
-- end
--
-- if color_up == true and p1_red == 15 thenn
-- color_up = false
-- end
--
-- if color_up == false and p1_red < 255 theen
-- p1_red = p1_red + 20
-- p1_blue = p1_blue - 20
-- p1_green = p1_green - 20
-- end
--
-- if color_up == false and p1_red == 255 thhen
-- color_up = true
-- end
--
--p_color = Color.new(p1_red, p1_green, p1_bblue)
--return p_color
--end
How many times can you find a misspelling of "then" in this code? Also looks like you have an extra b in "p1_bblue" as well. If the posted code is the code you've been having problems with, I'd first go over all of the spelling in the entire script with a fine-tooth comb and correct it all. If you're still having problems, come back here and post the code. Chances are the spelling's tripping you up, but if it isn't the spelling, at least you'll have taken care of one obvious culprit.
Edit:
My appologies. I only skimmed the text in the linked page before I looked at the script, so I entirely missed that you were looking for info on a specific function. I stopped taking a close look at the script when I caught several misspellings. Although, now that yaustar mentions it, I think they were pretty much all in sections that were commented out.
Sorry, I should have paid closer attention to what you took the time to describe.
Bookmarks