# HG changeset patch # User RedGrinner # Date 1291651372 0 # Node ID bdfa650e1af1b4d0c90c0f9a419f8b6eb231f6e8 # Parent ef26ff619aea3ff7f802c18979c9e5bbeeded596 Edited wiki page LuaAPI through web user interface. diff -r ef26ff619aea -r bdfa650e1af1 LuaAPI.wiki --- a/LuaAPI.wiki Mon Dec 06 15:59:45 2010 +0000 +++ b/LuaAPI.wiki Mon Dec 06 16:02:52 2010 +0000 @@ -70,11 +70,11 @@
This function is called when a gear is damaged.
-Notice: Lua is case-sensitive. The 'O' in 'OnGearDamage' needs to be big, or Hedgewars won't pick up this function call. This unusual capitalisation will probably be fixed in 0.9.15. +Notice: Lua is case-sensitive. The 'O' in 'OnGearDamage' needs to be capitalised, or Hedgewars won't pick up this function call. This unusual capitalisation will probably be fixed in 0.9.15. Example: - function onGearDamage(gear, damage) + function OnGearDamage(gear, damage) if (!GetGearType(gear) == gtHedgehog) then -- adds a message saying, e.g. "Hoggy H took 25 points of damage" !AddCaption(!GetHogName(gear) .. ' took ' .. damage .. ' points of damage')