Hey Guys,
I'm new to Windbot and just started to script myself (a little bit).
So after this Code:
I get the Error: attempt to perform arithmetic on global 'HPs' (a nil value)Code:HPs = getuseroption('Health Potions') Spears = getuseroption('Spears') SpearsGot = itemcount(3277, 'all') HPsGot = itemcount(266, 'all') SpearsBuy = SpearsGot - Spears HPsBuy = HPsGot - HPs MoneyAll = ((-(SpearsGot - Spears))*9) + ((-(HPsGot - HPs)*45)) if MoneyAll < 9 then say('hi') wait(1500, 3000) npcsay('deposit all') wait(500,700) npcsay('yes') wait(500,700) gotolabel('Start', 'ToHunt') else say('hi') wait(1500, 3000) npcsay('deposit all') wait(500,700) npcsay('yes') wait(500,700) npcsay('withdraw '..MoneyAll) wait(500, 700) npcsay('yes') wait(500, 700) end
It's in line 7, I tried everything but nothing helped.
I appreciate any help!
Thanks in advance.