Fix some syntax errors in internal Lua syntax documentation
authorWuzzy <Wuzzy2@mail.ru>
Sat, 15 Sep 2018 16:22:04 +0200
changeset 13783 e2d902745fd5
parent 13782 3fa9e30927f1
child 13785 fdae1ed9b6db
Fix some syntax errors in internal Lua syntax documentation
ChangeLog.txt
hedgewars/uScript.pas
--- a/ChangeLog.txt	Sat Sep 15 15:26:23 2018 +0200
+++ b/ChangeLog.txt	Sat Sep 15 16:22:04 2018 +0200
@@ -110,8 +110,8 @@
 
 Lua API:
  * Deprecation: Setting TurnTimeLeft/ReadyTimeLeft directly is deprecated and will become useless in future. Use the setter functions below
- + New call: SetTurnTimeLeft(TurnTimeLeft): Set remaining turn time
- + New call: SetReadyTimeLeft(ReadyTimeLeft): Set remaining ready time
+ + New call: SetTurnTimeLeft(newTurnTimeLeft): Set remaining turn time
+ + New call: SetReadyTimeLeft(newReadyTimeLeft): Set remaining ready time
  + New call: Retreat(time [, respectGetAwayTimeFactor): Force current turn into retreating mode
  + New call: GetAmmoTimer(gearUid, ammoType): Returns current set timer for given ammoType and hog gear in ms. Returns nil for non-timerable ammo
  + New call: EnableSwitchHog(): Enable hog switching
--- a/hedgewars/uScript.pas	Sat Sep 15 15:26:23 2018 +0200
+++ b/hedgewars/uScript.pas	Sat Sep 15 16:22:04 2018 +0200
@@ -2199,8 +2199,8 @@
 var s: LongInt;
     soundState: boolean;
 const
-    call = 'SetSoundMasked';
-    params = 'soundId, isMasked]';
+    call = 'SetSoundMask';
+    params = 'soundId, isMasked';
 begin
     if CheckLuaParamCount(L, 2, call, params) then
         begin
@@ -2810,7 +2810,7 @@
     placed, behind, flipHoriz, flipVert : boolean;
 const
     call = 'PlaceSprite';
-    params = 'x, y, sprite, frameIdx, tint, behind, flipHoriz, flipVert, [, landFlag, ... ]';
+    params = 'x, y, sprite, frameIdx, tint, behind, flipHoriz, flipVert [, landFlag, ... ]';
 begin
     placed:= false;
     if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then
@@ -2858,7 +2858,7 @@
     eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert : boolean;
 const
     call = 'EraseSprite';
-    params = 'x, y, sprite, frameIdx, eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert, [, landFlag, ... ]';
+    params = 'x, y, sprite, frameIdx, eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert [, landFlag, ... ]';
 begin
     if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then
         begin
@@ -3212,7 +3212,7 @@
 function lc_setturntimeleft(L : Plua_State) : LongInt; Cdecl;
 var number: Int64;
 begin
-    if CheckLuaParamCount(L, 1, 'SetTurnTimeLeft', 'TurnTimeLeft') then
+    if CheckLuaParamCount(L, 1, 'SetTurnTimeLeft', 'newTurnTimeLeft') then
         begin
         number:= Trunc(lua_tonumber(L, 1));
         if number < 0 then
@@ -3229,7 +3229,7 @@
 function lc_setreadytimeleft(L : Plua_State) : LongInt; Cdecl;
 var number: Int64;
 begin
-    if CheckLuaParamCount(L, 1, 'SetReadyTimeLeft', 'ReadyTimeLeft') then
+    if CheckLuaParamCount(L, 1, 'SetReadyTimeLeft', 'newReadyTimeLeft') then
         begin
         number:= Trunc(lua_tonumber(L, 1));
         if number < 0 then