Problem with BinaryEncode and variable params

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Dec 18 04:40:31 EST 2006


If I execute the following

   put "0,0,1" into x
   put x+0

I get the error

Type: Operator (+: error in left operand)
Object: button id 1003 of card id 1002 of stack "Untitled 1"
Object name: Button
Line: put x+0 (row 3 col 7)
Hint:

Here, x is a string rather than a number and you can't do  
calculations on it. I bet a similar problem causes your data type  
error. Can you check what is in the variable before you execute  
binaryEncode?

Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store software.  
Download at http://www.salery.biz

Op 17-dec-2006, om 17:12 heeft Bryan McCormick het volgende geschreven:

> Mark,
>
> Thanks for the work around, however it would be nice if we could  
> get to the bottom of this and figure out why binaryEncode isn't  
> taking the variable as it should. It ought to work, there are  
> examples out there which did work seemingly in the past using this  
> method.
>
> To be clear it is binaryEncode which is throwing the error of  
> "wrong data type". See previous first post where it is pretty clear  
> that binaryEncode should be seeing the vars as numbers.
>
>
> Thanks all.





More information about the use-livecode mailing list