The AC130U is a computer system with an airframe attached, not a cheap and cheerful CAS asset, and has taken quite a few years to get 'right'. The USAF quote, bottom of this link
http://www.af.mil/factsheets/factsheet.asp?fsID=71
unit costs of $190M (in 2001 dollars so add inflation). It is an incredibly precise and accurate weapons system, but still prone to target identification problems.