我环顾四周,我已经收集到这意味着中断是无法到达的,但我不明白它是如何无法到达的,或者它试图达到什么。我得到错误的代码如下,也许有人可以告诉我要添加什么以使中断可达:
#region :buy <item>
case "buy":
string Item = stringManager.wrapParameters(args, 1);
if (Item == "bread")
{
int foodfunds;
int myfood;
int foodCheck;
int creditCheck;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
foodfunds = dbClient.getInt("SELECT credits FROM users WHERE name = '" + _Username + "'");
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
myfood = dbClient.getInt("SELECT food FROM users WHERE name = '" + _Username + "'");
if (foodfunds < 10)
{
Room.sendData("BK" + "Not enough cash.");
}
if (_roomID != 193)
{
sendData("BK" + "You must be in the supermarket to buy bread");
}
else
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
dbClient.runQuery("UPDATE users SET food = food + 1 WHERE name = '" + _Username + "'");
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
foodCheck = dbClient.getInt("SELECT food FROM users WHERE name = '" + _Username + "'");
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
dbClient.runQuery("UPDATE users SET credits = credits - 10 WHERE name = '" + _Username + "'");
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
creditCheck = dbClient.getInt("SELECT credits FROM users WHERE name = '" + _Username + "'");
Room.sendShout(roomUser, "*Buys a loaf of bread and stashes in bag*");
Room.sendSaying(roomUser, "(Now have: " + foodCheck + " loaves of bread)");
Room.sendSaying(roomUser, "(Now have: " + creditCheck + " credits left)");
}
if (myfood > 255)
{
Room.sendData("BK" + "You cannot carry anymore food!");
}
break;
}
#endregion