Getting error at: run script "«data cstr" - Why?

I tryed to embed the following code into a ASS project…

stringtoHex("The Who at the isle of Wight") 
--> "5468652057686F206174207468652069736C65206F66205769676874" 

hextoString(result) 
--> "The Who at the isle of Wight" 

on stringtoHex(this_string) 
    this_string as C string 
    try 
        result * 5 
    on error msg 
        return text from character 22 of msg to character -19 of msg 
    end try 
end stringtoHex 
on hextoString(t) 
    set z to "" 
    repeat with i from 1 to t's length by 252 
        try 
            set z to z & (run script "«data cstr" & ¬ 
                text from character i of t to character (i + 251) of t & "00» as string") 
        on error 
            set z to z & (run script "«data cstr" & ¬ 
                text from character i of t to character -1 of t & "00» as string") 
        end try 
    end repeat 
    z 
end hextoString

…but everytime I hit “Build and Run” I get an error mark at the line below:

set z to z & (run script "«data cstr" & ¬ 

what do I have to do with

run script "«data cstr"

to get it running?

Thx Vince

Use this:

stringtoHex("The Who at the isle of Wight")
--> "5468652057686F206174207468652069736C65206F66205769676874" 

hextoString(result)
--> "The Who at the isle of Wight" 

on stringtoHex(this_string)
	this_string as C string
	try
		result * 5
	on error msg
		return text from character 22 of msg to character -19 of msg
	end try
end stringtoHex
on hextoString(t)
	set z to ""
	repeat with i from 1 to t's length by 252
		try
			set z to z & (run script "«data cstr" & text i thru (i + 251) of t & "00» as string")
		on error
			set z to z & (run script "«data cstr" & text i thru -1 of t & "00» as string")
		end try
	end repeat
	z
end hextoString

“¬” is the applescript continuation character, and most probably you mispelled something when copy-pasting to Xcode, or Xcode doesn’t parse fine the continuation character (?), so simply eliminate “¬” and join the lines, as exposed above :wink:
btw, “data cstr” --C string-- is now deprecated, so I must write a new handler in a near future…