Problem with BinaryEncode and variable params
bryan at deepfoo.com
Sat Dec 16 11:06:14 EST 2006
I am a bit baffled here. I have seen many sample scripts where variables
are passed as parameter to binaryEncode (in my case, for imageData) but
no matter how I try to pass the known numeric values, the compiler
throws an error.
take a string of the form 0,206,0 as returned from the color picker,
let's call this tColors
Then I put each value into a separate param
put item 1 of tColors+0 into c1
put item 2 of tColors+0 into c2
put item 3 of tColors+0 into c3
(I added the +0 to make sure the var was seen as a number, I tried it
without as well with the same error)
Then I call:
put binaryEncode("CCCC",0,c1,c2,c3) into varNewImageData
and it fails.
I tried to pass all the params as a quoted string, concatenated, you
name it I have tried it.
It's likely dead simple. But for the life of me I cannot get it.
This is in 2.7.4
More information about the Use-livecode