
Originally Posted by
LordChronos
@
Demon dude I'm stupid... I din't really test your code back then and now I have an error : (Attachment not verified) The problem is " 'i' does not exist in the current context.
Now if I try to fix it my way, the previous problem arises.
What should I do?
OOC, I sent you a friend request
Don't upload your images in an MPGH format upload it in like an igmur link but...
it says that because I gave you a part of the code, you have to combine it with your existing code.
Code:
for (var i = 0; i < Inventory.Length; i++)
{
if (Inventory[i].ObjectId == "Dragon Pearl")
{
Inventory[i] = Manager.GameData.Items[0x108e];
Player.SendInfo("Quest Complete");
UpdateCount++;
SaveToCharacter();
for (var e = 0; e<= Inventory.Length; e++)
{
if (Inventory[e] == "Task Tablet 1")
{
Inventory[e] = Manager.GameData.Items[...];
return true;
}
}
}
}
if tasktablet one is consumed try something like this...
Code:
for (var i = 0; i <= Inventory.Length; i++)
{
bool questcomplete = false;
if (Inventory[i].ObjectId == "Dragon Pearl")
{
Inventory[i] = Manager.GameData.Items[...];
Update++;
SaveToCharacter();
SendInfo("Quest Complete");
questcomplete = true;
}
if (Inventory[i] == null && questcomplete == true)
{
Inventory[i] = Manager.GameDate.Items[...];
return;
}
}