我正在尝试使用隧道连接运行 expo,但我不断收到以下错误:
Error starting tunnel Failed to install @expo/ngrok@^2.4.3 globally: npm exited with non-zero code: 243
我已经尝试在我的项目中全局安装此版本的 ngrok,并将其删除以允许 expo 自动进行安装。通过使用expo start而不是启动项目,它确实成功运行了一次,npm start但这似乎不再起作用。
所以我正在开发一个基于文本的游戏,我有一个商店,你可以卖出矿石.我有一个if语句,检查您要出售的矿石数量是否大于您拥有的数量.无论我输入什么号码,我都说不够.
copore = 100 #testing
op = raw_input(p)
if op.lower() == "copper":
print"""
You have %r copper ore.
How much would you like to sell?
""" % copore
op = raw_input(p)
if op.lower() > copore:
print"""
You do not have that much copper ore.
You have %r copper ore.
""" % copore
menu()
elif op.lower() <= copore:
copore = copore - op
gold = gold + (op * 2)
print"""
You sell your copper ore for 2 gold each.
You …Run Code Online (Sandbox Code Playgroud) 我有一个方法,它采用整数作为大小的值.此最大大小为14,否则它将与屏幕上的其他对象重叠.我是否可以对数字设置限制,以便在我尝试传入超过14的数据时会给我一个错误?