Spoiler: This is code (Open)The problem here is that when Script 61 is executed, it goes straight to else if (checkinventory("money") >= 500) instead of else if(checkinventory("outofsight") >= 1 && checkinventory("money") >= 1250 ) and etc. I am still fixing this. Any assistance is appreciated.
[SOLVED] "CheckInventory" fails to execute
[SOLVED] "CheckInventory" fails to execute
While working on the new update for Despair, the PowerGum system decides to not function correctly. Before this occurrence, it was working just fine without any problems.
Last edited by Fabysk on Sat May 27, 2017 11:16 am, edited 1 time in total.
Re: [SOLVED] "CheckInventory" fails to execute
The easiest way possible for a fix.
Just had to type in the last "else if" if the player had no PowerGums in their inventory. Included all PowerGums available.
Code: Select all
else if (checkinventory("money") >= 500 && checkinventory("outofsight") <= 0 && checkinventory("lightson") <= 0
&& checkinventory("ConcealedFighter") <= 0 && checkinventory("LimitlessClip") <= 0 && checkinventory("WalkingTank") <= 0
&& checkinventory("Vampirism") <= 0 && checkinventory("QuickPace") <= 0 && checkinventory("SubZeroInterval") <= 0
&& checkinventory("SwiftDeath") <= 0 && checkinventory("TriggerHappy") <= 0 && checkinventory("Reinstitute") <= 0
&& checkinventory("EnchantedPurchase") <= 0 && checkinventory("DrinksonMe") <= 0 && checkinventory("ReplenishedArsenal") <= 0
&& checkinventory("DeathUponThem") <= 0 )
{
ACS_Execute(Random(710, 740), 0,0,0,0);
takeinventory("money",500);
THINGSOUND(21, "sound/GUMBUY", 127);
Delay(40);
acs_execute(66, 0, 0, 0, 0);
GumActive2 = 1;
ThingSound(21, "sound/GUMDISP", 127);
ACS_Terminate(68,0);
}
}