Question on blackname and jail

12/14/2009 07:05 WHITELIONX#1
#region Warden
case 42:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you want to leave jail?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("Just passing by.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (GC.MyChar.PKPoints < 100) ;



else if (Control == 1)
GC.MyChar.Teleport(1002, 514, 355);
break;
}
#endregion

Ok so this is what I have so far but it throws a warning "Possible mistaken empty statement" All I am attempting to do is to have it so that a blackname can not leave jail until he/she has paid cash. What am i missing if I am only getting one warning instead of an error?
12/14/2009 08:55 kinshi88#2
Watch your brackets and if statements.
12/14/2009 10:09 Korvacs#3
Code:
if (GC.MyChar.PKPoints < 100) ;
Theres your problem.
12/14/2009 18:58 WHITELIONX#4
#region Warden
case 42:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you want to leave jail?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("Just passing by.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You need 2.000Cps and all because you`re blacknamed"));
GC.AddSend(Packets.NPCLink("Yes i have", 2));
GC.AddSend(Packets.NPCLink("Sorry, That is to tough for me.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (Control == 2)
{
if (GC.MyChar.PKPoints >= 100)
{
if (GC.MyChar.CPs >= 2000)
{
GC.MyChar.CPs -= 2000;
GC.MyChar.Teleport(1002, 514, 355);
}
else
{
GC.AddSend(Packets.NPCSay("Sorry you dont have 2.000cps"));
GC.AddSend(Packets.NPCLink("See you again.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}


else if (Control == 1)
GC.MyChar.Teleport(1002, 514, 355);
break;
}
#endregion

And with this code? I knew I had several probs with the first code so decided to try to change it some what. Comes up with 303 errors but I know it is probably just due to one stupid bracket or something lol. I gave both of you thanks for taking time out to answer me :)
12/14/2009 20:01 kinshi88#5
Again watch your brackets.
12/14/2009 20:37 WHITELIONX#6
>.< I have been playing around and changing and deleting brackets and moving things around but am still having problems am I adding to many brackets OR not enough or are some the wrong way around? This is what I have so far.....

#region Warden
case 42:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you want to leave jail?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("Just passing by.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You need 2.000Cps and all because you`re blacknamed"));
GC.AddSend(Packets.NPCLink("Yes i have", 2));
GC.AddSend(Packets.NPCLink("Sorry, That is to tough for me.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

if (Control == 1)
{
{
GC.MyChar.Teleport(1002, 514, 355);
{

GC.AddSend(Packets.NPCSay("Sorry you dont have 2.000cps"));
GC.AddSend(Packets.NPCLink("See you again.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

if (Control == 2)
{
if (GC.MyChar.PKPoints >= 100)
{
if (GC.MyChar.CPs >= 2000)
{
GC.MyChar.CPs -= 2000;
GC.MyChar.Teleport(1002, 515, 355);
break;
}
}
#endregion
12/14/2009 20:40 Dormo#7
you use to need the code button pleese
12/14/2009 20:47 Kiyono#8
I switched around your code abit and it should work now.
Code:
#region Warden
                            case 42:
                                {
                                    if (Control == 0)
                                    {
                                        if (GC.MyChar.PKPoints >= 100)
                                        {
                                            GC.AddSend(Packets.NPCSay("You need 2.000Cps and all because you`re blacknamed"));
                                            GC.AddSend(Packets.NPCLink("Yes i have", 2));
                                            GC.AddSend(Packets.NPCLink("Sorry, That is to tough for me.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Do you want to leave jail?"));
                                            GC.AddSend(Packets.NPCLink("Yes.", 1));
                                            GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.Teleport(1002, 514, 355);
                                    }
                                    else if (Control == 2)
                                    {
                                        if (GC.MyChar.CPs >= 2000)
                                        {
                                            GC.MyChar.CPs -= 2000;
                                            GC.MyChar.Teleport(1002, 514, 355);
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Sorry you dont have 2.000cps"));
                                            GC.AddSend(Packets.NPCLink("See you again.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                                #endregion
12/14/2009 21:04 WHITELIONX#9
Thank you I was close sort of hehe Yes it works :)))
12/14/2009 21:10 copz1337#10
whitelion when you put a code in don't use quotes use [ code ] paste the code [ / code ] but with no spaces