Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Sorry to ask for yet more help but... my snow's yellow!

Author
Message
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 15th Feb 2005 07:29
I think I already posted this snippet with a previous question (which I've since sorted), though I can't be sure because while I know I tried too I can't be certain as it hasn't appeared on the site yet. Anyhow, now my problem is that at one point in the code I have used a variable c to hold a number between 0 and 255, and then used rgb(c,c,c) to make a shade of grey using c as the brightness. But it's entirely ignoring the blue value, and produces varying shades of yellow instead. If I use rgb(0,c,c) it produces green, and rgb(c,0,c) produces red. Changing the value in the blue position makes no difference whatsoever. I expect I'm just missing something really obvious but if someone could point it out to me I'd be grateful, or if it works on their comp so I can get on with blaming my own steaming pile of junk that'd be good to. Thanks

Yes, sir, but sir is not a rabbit, is sir?
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 15th Feb 2005 10:56
Firstly, wrong forum for questions. Secondly, no code anyway so I can't help. Repost in the DBP forum with your code in a code box, not the source box, and I'll take a look.


Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 15th Feb 2005 21:11
Sorry, I thought I was in the Newbie forum when I posted it. I must had two windows open. Would have thought whatever moderator had to look at the post before allowing it to be posted would have moved it though. Oh well.

It's ok now - I had a command sequence

c#=(255/(avgspeed#*2))*snow#(n,4)
snow#(n,7)=rgb(c#,c#,c#)

which DBPro didn't like, but I fixed it by using instead
c#=(255/(avgspeed#*2))*snow#(n,4)
c=rgb(c#,c#,c#)
snow#(n,7)=c

Yes, sir, but sir is not a rabbit, is sir?

Login to post a reply

Server time is: 2024-11-24 03:08:54
Your offset time is: 2024-11-24 03:08:54