fixed weapon type typo spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Tue, 20 Aug 2013 06:07:58 +0300
branchspacecampaign
changeset 9550 59061246a25c
parent 9548 38630665c9ab
child 9552 90d69a2c1729
fixed weapon type typo
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Tue Aug 20 05:54:24 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Tue Aug 20 06:07:58 2013 +0300
@@ -526,13 +526,17 @@
 
 function saveWeapons()
 	-- firepunch - gilder - deagle - watermelon - sniper
-	SaveCampaignVar("HeroAmmo", GetAmmoCount(hero.gear, amFirepunch)..GetAmmoCount(hero.gear, amGilder)..
+	WriteLnToConsole("SAVE WEAPONS TRIGGERED: "..GetAmmoCount(hero.gear, amFirePunch)..GetAmmoCount(hero.gear, amGilder)..
+			GetAmmoCount(hero.gear, amDEagle)..GetAmmoCount(hero.gear, amWatermelon)..GetAmmoCount(hero.gear, amSniperRifle))
+	SaveCampaignVar("HeroAmmo", GetAmmoCount(hero.gear, amFirePunch)..GetAmmoCount(hero.gear, amGilder)..
 			GetAmmoCount(hero.gear, amDEagle)..GetAmmoCount(hero.gear, amWatermelon)..GetAmmoCount(hero.gear, amSniperRifle))
 end
 
 function loadWeapons()
 	local ammo = GetCampaignVar("HeroAmmo")
-	AddAmmo(hero.gear, amFirepunch, tonumber(ammo:sub(1,1)))
+	WriteLnToConsole("LOAD WEAPONS "..ammo)
+	WriteLnToConsole("LOAD WEAPONS "..ammo:sub(1,1))
+	AddAmmo(hero.gear, amFirePunch, tonumber(ammo:sub(1,1)))
 	AddAmmo(hero.gear, amGilder, tonumber(ammo:sub(2,2)))
 	AddAmmo(hero.gear, amDEagle, tonumber(ammo:sub(3,3)))
 	AddAmmo(hero.gear, amWatermelon, tonumber(ammo:sub(4,4)))