Home > other >  Cocos2d - x VS2015 lua running environment has a problem
Cocos2d - x VS2015 lua running environment has a problem

Time:09-20

First of all, my Python and Java JDK configuration was successful, in the DOS environment, input Python or Java and javac can get reply, below:
python:

Java:

javac:

I create a new project using the Cocos:



Open the project with VS2015, running at the same time, this time to normal:



With the BabeLua For 2015 V3.2.2.0 plugins to create a project:



Create success after, click the lua project, click on the main, the lua code, can appear the following error:



I know this is running environment has a problem, but I don't know how to solve, hope to master told, thank

In addition, in MainScene. Lua:



Can only use a Move to addTo, cannot use setPosition and addChild, or after the operation can't display images, only a black screen,
Second, can't use the require to call module,
Cannot create Layer, although not an error, but the same black screen,
For example:

The function GameScene: createLayer ()
GameScene cclog (" init ")
The local layer=cc. Layer: the create ()

The local Sprite=cc. Sprite: create (" HelloWorld. PNG ")
Sprite: setPosition (cc) p (size. Width/2, the size height/2))
Layer: addChild (Sprite)
The return layer
End

I want to create a scene, you must call:

Local MainScene=class (" MainScene cc. The load (" MVC "). The ViewBase)

MainScene. RESOURCE_FILENAME="MainScene. The CSB"

Name to replace MainScene with own scene, but also the above problems in this scene,

I solve this problem for a long time, whether it's reading Cocos2d - x combat Lua volume, or surf the Internet search, did not solve, written code, the code on the net,
In my Lua project, don't run out smoothly as a result, either an error or black screen, refactoring helloword failure, to uninstall, all configuration again,
Or so, please, help me,

The younger brother in the
  • Related