本帖最后由 赵贺景 于 2014-4-28 18:34 编辑
public static string getmapstring(int pos)
{
string result = "";
if (playerpose[0] == pos && playerpose[1] == pos)
{
result = "<>";//AB同在一格
}
else if (playerpose[0] == pos)
{
result = "A";//A在当前格
}
else if (playerpose[1] == pos)
{
result = "B";//A在当前格
}
else
{
switch (map[pos])
{
case 0:
result = "□";
break;
case 1:
result = "◎";
break;
case 2:
result = "※";
break;
case 3:
result = "▲";
break;
case 4:
result = "◆";
break;
}
return result;
}
}
错误 1 “飞行棋.Program.getmapstring(int)”: 并非所有的代码路径都返回值 E:\unity\ConsoleApplication1\飞行棋\Program.cs 108 29 飞行棋
这是 是不是有漏掉的没有定义的地方啊
|