You can also do
Code:
pattern = "I have sold <<1[no items/a single item/$d items]>>."
msg = zo_strformat(pattern, num)
If num = 0
msg = "I have sold no items"
if num = 1
msg = "I have sold a single item"
if num > 1 (ie 5 in this case)
msg = "I have sold 5 items"