Newlines in lua scripts are saved as the \n char combination in savegames, and in stings that continue over newlines (continued with \ then newline), that is saved as \\n in the savegame. When the savegame is restored, newlines are inserted in the strings causing lua syntax errors. The result is that the lua script is not run properly when loading games. Using 2.1 branch r13060 To reproduce: Start a new game with the tutorial scenario Save during the first turn Leave, load the save >From server log: ---- 3: Trying "default/script.lua". 1: lua error: [string "script.code"]:5: unfinished string near `"Welcome to Freeciv. You lead a civilization. Your' 2: function turn_callback(turn, year) 3: if turn == 0 then 4: notify.event(nil, nil, E.TUTORIAL, --> 5: _("Welcome to Freeciv. You lead a civilization. Your 6: task is to conquer the world! You should start by 7: exploring the land around you with your explorer, 8: and using your settlers to find a good place to build 1: lua error: attempt to call a table value stack traceback: ---- Is this a regression? Does it depend on lua version?
Description: GNU Zip compressed data
_______________________________________________ Freeciv-dev mailing list Freecivfirstname.lastname@example.org https://mail.gna.org/listinfo/freeciv-dev