openfl

Open full view…

Class not found : UInt

DaniƫlHaazen
Sat, 01 Nov 2014 17:58:32 GMT

When I try to build my game, I get this error. I just installed haxe, lime and openfl. I checked, and everything is up-to-date. I am on Linux, and this is what happens when I try to build to Linux. When building to HTML5 it gives me: /usr/share/haxe/lib/lime/2,0,0-alpha,6/lime/Assets.hx:1220: characters 1-23 : Cannot declare member variable in abstract I have no idea what is going on and how to fix this. Thanks for the help in advance!

player_03
Sat, 01 Nov 2014 20:23:48 GMT

On most if not all non-Flash targets, `UInt` is not defined and you have to use `Int` instead. An easy way to accomplish this is to add the following at the bottom of the file: --- #if !flash typedef UInt = Int; #end ---

DaniƫlHaazen
Sun, 02 Nov 2014 01:36:11 GMT

The problem is that then I will get this error: /usr/share/haxe/lib/openfl/2,1,4/openfl/geom/Matrix3D.hx:174: lines 174-186 : Class not found : UInt And now don't tell me I'm supposed to add that to whole openfl?

player_03
Sun, 02 Nov 2014 01:55:10 GMT

I was going to suggest another workaround, but then I remembered why this shouldn't be an issue. Haxe [implements UInt](https://github.com/HaxeFoundation/haxe/blob/development/std/UInt.hx) for you. Try [updating Haxe](http://haxe.org/download/).