Can't Make LUA Work (using the Wiki LUA Tutorial as a base)

Androrc the Orc

Emperor
Joined
Apr 19, 2004
Messages
1,621
Location
Vienna, Austria
I tried to set up a basic LUA script just to see if it would work, as per the Wiki LUA Tutorial's instructions:

http://wiki.2kgames.com/civ5/index.php/Lua_Tutorial#My_best_ModBuddy:_Setting_up_a_Lua_mod

...but I keep getting this error in the Tuner:

Code:
 Syntax Error: [string "C:\Users\André\Documents\My Games\Sid Meier's Civilization 5\M..."]:1: unexpected symbol near ''
 Runtime Error: Error loading C:\Users\André\Documents\My Games\Sid Meier's Civilization 5\MODS\Antarctic Lands (v 1)\Tribes.lua.

This is the basic LUA script:

Code:
-- Lua Script1
-- Author: Andre
-- DateCreated: 2012-01-29 10:59:38 AM
--------------------------------------------------------------

print("We are the tutorial. You will be tutored. Resistance is futile.")

Any ideas as on why this is happening?

EDIT: I got it to work now. For some reason the default created Lua script didn't get empty even if I deleted all of it's contents (it remained with 3 bytes rather than 0). I deleted it's contents manually through an external editor, and then it got to actual 0 bytes. I transferred that changed file to the mod's folders and now Lua works.

My guess is that this was happening somehow due to my Windows' account name (André) since it has a non-accented character. It's the name that went automatically to the "Author:" commented out line. Even though I deleted the accented character and replaced it with a normal "e", there must have been something left over in the file.
 
Ha! You may have solved one of my problems here. I've had my base Lua files in the mod for 6 months now with no need to add any more, until recently. At some point I changed the name from Ea to Éa. I haven't had any other problems but the last time I tried to add a Lua file from scratch I saw the same error.
 
Back
Top Bottom