ID:262391
 
Code:
newcolor=color-rgb(amount,amount,amount)


Problem description:
That line gives me a type mismatch. The variable color is defined using rgb(), so I don't understand the problem. I'm assuming that it's because rgb does't return an integral value as I was hoping it would... Or something like that.

Spanks,
Prodigal Squirrel

I'm fairly sure RGB returns a string.
In response to Jp
An Example of using RGB.
var/R = input("Red?")as num
var/G = input("Green?")as num
var/B = input("Blue?")as num//It is VERY important to have "as num" in there, or else it will be a text string.
//That's where you were having your problem.
src.icon += rgb(R,G,B)

[EDIT: Now that I look at it more closely....]
I'm not sure i have what your asking for..
Just make sure all of your strings are numbers and not text containing numbers.
rgb() returns a string, and you can't subtract a string from a string. Instead, record the RGB values of each colour and subtract them manually; then feed the result back into rgb().
In response to Flame Sage
Flame Sage wrote:
Just make sure all of your strings are numbers and not text containing numbers.

They are for sure numbers.

Prodigal Squirrel
In response to Crispy
Thanks

Prodigal Squirrel