Yeah, I would advise you, when doing that cave, to equip no encounters (Charm Bangle I believe), cos there's all kinds of counters you'll have to run through to complete there. This line says that if you spent gil in a battle (ie threw it with Spare Change I think) and therefore have an overall negative gil count from that battle, it says use 0.

Its very confusing, and the codes are never the same... Writing stuff down as well as equiping no encounters will help a lot.