for assembly, see above as for the error i've just checked that source you posted (the link)

seems basicstring is a record, so i think you need to check the function "basicstring2string"