#region Boxing
if (Control == 4)
{
if (GC.MyChar.InventoryContains(1088000, 1))
{
GC.AddSend(Packets.NPCSay("Ok i will upgrade you Proficiency for you."));
GC.AddSend(Packets.NPCLink("Thank you", 255));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, Exp = 0 });
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.InventoryContains(1088000, 1))
{
GC.AddSend(Packets.NPCSay("Congratulations your weapon proficiency has improved."));
GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, });
GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 2, Exp = 0 });
}
else
{
GC.AddSend(Packets.NPCSay("You don't have the required items"));
GC.AddSend(Packets.NPCLink("Sorry", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
#endregion
I am not very good with else and else if statments. i am trying to get it to work like.
If skill = 000, lvl = 1 then upgrade to skill = 000, lvl =2, exp = 0
anyone can help me with this would be awesome.
Thanks in advance.
yer i know lol but that would only be until i could fix it to use += somehow could ya help me with an else if on this code that i have posted here? then i can just implement it into the rest of my code
I guess it would be,
if (GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, Exp = 0 }))
{
GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 2, Exp = 0 })
}
That repeatedly lol
I guess it would be,
if (GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, Exp = 0 }))
{
GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 2, Exp = 0 })
}
That repeatedly lol
bool is either true or false.. void is just running what's inside the { }.. you're calling a void as a true or false.. post the exact lines you're erroring at..
Oh now i get it why not just add it to the prof ***....
It is the prof ***, but only 1 part of it. I am making one like reg CO but using a DB for each lvl not expballs
I dont get errors as such, But if i use += 1 it will error whereas if i use = 1 it will work but only make the prof lvl 1 and wont lvl it up by a lvl.
I have tried many things and nothing is working.
If someone thinks they can fix this i can send the whole code so you can see what i mean