Page 1 of 1

Finding a unitdef metal cost in an *A mod [solved]

Posted: 14 May 2014, 04:10
by Bla
in the spring java wrapper thing, given UnitDef uni and EngineCallback cb, to find the cost in metal I do
uni.findCost(cb.getResourceByName("metal"))
but I keep getting NullPointerException.

Is the resource name not "metal"?

Re: Finding a unitdef metal cost in an *A mod

Posted: 14 May 2014, 08:00
by gajop
try "Metal" instead

Re: Finding a unitdef metal cost in an *A mod

Posted: 15 May 2014, 00:20
by Bla
Hey, works thanks!