Help with HelloWorld tutorial
-
Hi all, im following the tutorial to make the HelloWorld text, when I try to test it, it gives me back this error:
source/PlayState.hx:10: characters 1-5 : Unexpected text
This is the PlayState.hx:
package;
import flixel.FlxState;
class PlayState extends FlxState
{
override public function create():Voidvar text = new flixel.text.FlxText(0,0,0,"hello",64); text.screenCenter(); add(text); { super.create(); } override public function update(elapsed:Float):Void { super.update(elapsed); }
}
Help me please
-
Hi @Simone-M.M.
It looks like you have a
{
out of place. Try this.package; import flixel.FlxState; class PlayState extends FlxState { override public function create():Void { // <- This one was out of place var text = new flixel.text.FlxText(0,0,0,"hello",64); text.screenCenter(); add(text); super.create(); } override public function update(elapsed:Float):Void { super.update(elapsed); } }
-
@dean Ok, I feel really stupid ahah. Thank you now it works!