Biggest glitch ever

Non-platform specific questions.

Biggest glitch ever

Postby Hblade » Wed Jul 08, 2009 6:16 pm

I know it's not the perfect hue cycle method but just find this out. Ok, heres the code for the void
Code: Select all
void HueCycle();
{
    tempcount = tempcount + 1;
    if (tempcount == 19)
    {
    r = r + rand(255);
    b = b + rand(255);
    g = g + rand(255);
    tempcount = 0;
    }
    if (r < 255)
    {
        r++;
    }
    if (b < 255)
    {
        b++;
    }
    if (g < 255)
    {
        g++;
    }
    if (r == 255)
    {
        r = 0;
    }
     if (b == 255)
     {
         b = 0;
     }
     if (g == 255)
     {
     g = 0;
     }
}

EDIT: (It still turns yellow when saying HueCycle)
That dosnt work for some reason, it says "Undeclaired Function: HueCycle();" but yet, when I jsut put this in the draw actor instead of the void, it works fine :/
Code: Select all
    tempcount = tempcount + 1;
    if (tempcount == 19)
    {
    r = r + rand(255);
    b = b + rand(255);
    g = g + rand(255);
    tempcount = 0;
    }
    if (r < 255)
    {
        r++;
    }
    if (b < 255)
    {
        b++;
    }
    if (g < 255)
    {
        g++;
    }
    if (r == 255)
    {
        r = 0;
    }
     if (b == 255)
     {
         b = 0;
     }
     if (g == 255)
     {
     g = 0;
     }

Any ideas?
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Biggest glitch ever

Postby Fuzzy » Wed Jul 08, 2009 6:29 pm

Code: Select all
void HueCycle();


is wrong. It should be
Code: Select all
void HueCycle()


take the semi-colon off.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Biggest glitch ever

Postby Hblade » Wed Jul 08, 2009 6:34 pm

Wow, that was a typo I made
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Biggest glitch ever

Postby Fuzzy » Wed Jul 08, 2009 6:42 pm

Hblade wrote:Wow, that was a typo I made



Happens to everyone, all the time.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron