kalista is error!!! inspired lua 310 error
I'm also encountering a similar error. Here's some more details, though, since I'd like to help and not just complain. The champ I'm trying to use is Kalista.
I downloaded the .zip, and I downloaded the CloudAIO.lua from the github and replaced the old CloudAIO with the new one.
I downloaded the Script Loader from Inspired.
my testscript1.lua file looks like this:
require('Inspired')
require('IAC')
-- require('WardJump')
require('CloudAIO')
-- pcall( require, GetObjectName(GetMyHero()) )
In my /common folder I have the following .Luas
CloudAIO
IAC
IMenu
Inspired
WardJump
When I test the behaviour in a custom game - With no enemy champs I get the following popup:
CloudAIO.lua:62
attempt to index global 'IWalkConfig' (a nil value)
Clicking okay allows me to continue with the game.
With One or more Enemy Champs
Inspired.lua:310:
attempt to perform arithmetic on a nil value
Clicking OK does not allow me to continue, and there is no way to play the game
Inspired.Lua line 310 is contained in the CalcDamage function:
function CalcDamage(source, target, addmg, apdmg)
local ADDmg = addmg or 0
local APDmg = apdmg or 0
local ArmorPen = math.floor(GetArmorPenFlat(source))
local ArmorPenPercent = math.floor(GetArmorPenPercent(source)*100)/100
local Armor = GetArmor(target)*ArmorPenPercent-ArmorPen
local ArmorPercent = Armor > 0 and math.floor(Armor*100/(100+Armor))/100 or math.ceil(Armor*100/(100-Armor))/100
local MagicPen = math.floor(GetMagicPenFlat(source))
local MagicPenPercent = math.floor(GetMagicPenPercent(source)*100)/100
local MagicArmor = GetMagicResist(target)*MagicPenPercent-MagicPen
local MagicArmorPercent = MagicArmor > 0 and math.floor(MagicArmor*100/(100+MagicArmor))/100 or math.ceil(MagicArmor*100/(100-MagicArmor))/100
return (GotBuff(source,"exhausted") > 0 and 0.4 or 1) * math.floor(ADDmg*(1-ArmorPercent))+math.floor(APDmg*(1-MagicArmorPercent))
end
Where the line 310 includes the GetArmor function with the argument of 'target'. I tried modifying this line to
local Armor = 0
and with 1 enemy champ I got the error message
Inspired.Lua:308:
bad argument #1 to 'floor' (number expected, got no value)
Clicking 'ok' takes me to another error
Inspired.Lua:315
attempt to perform arithmetic on a nil value
Clicking 'ok' does not let me continue.
So I modified line 315 to equal zero as well, line 315 also contained the arg 'target'
This let me continue with the game. I think there's something wrong with how this script is passing the 'target' into the CalcDamage function somehow, but I'm not smart enough to figure it out.
Oh and when I teleported roughly within range of the enemy champ ingame,
it gave me an error
CloudAIO.lua:92:
attempt to compare nil with number
which I couldn't 'Ok' out of until the enemy walked out of range. Line 92 is the KS with Q function. I disabled that in the script UI ingame and the error did not occur when the enemy returned. I should also add that laneclear with E works pretty well as does KS'ing with E on Kalista.