求教在lua中使用中文变量和函数

由于是关于中文的帖子,估计外国人也不太感兴趣,我就直接用汉语写了,
百度到一些帖子,都是改lua源码,可是放到cocos2d-x里总是行不通,运行的时候出错.
但是策划那边强烈要求支持中文,没办法,就上论坛来求助了,希望高手们多多支持下.:slight_smile:

It’s no a recommended approach to use lua.
As you can see, we rarely, rarely see successful programming language in Chinese, or any other languages besides English.
Why not consider this case in another point of view: let your game designer write xml/json, then you use lua to parse and execute them?

感谢回答
我的需求是这样的,我要使用lua做一套战斗逻辑,其中使用了各种对象的属性,
比如代码 hurt = fighter1.attack - fighter2.defend
写成中文就是 伤害值 = 战士1.攻击 - 战士2.防御
这样拿给策划用会很方便,通俗易懂,我也省得写注释了,用一句经典的话说,Laziness is a programmer’s prime virtue…
使用脚本本来就是要给策划使用,增加灵活性的,如果用xml/json来做的话,可能就失去这层意义了