
Lv.1
"人们相互蔑视,又相互奉承,人们各自希望自己高于别人,又各自匍匐在别人面前"
签名:神岛的Ezra_,在做作品啦当然是() 一枚什么都不是的代码师() https://box3.fun/e/64346e4395b196424bab
在 【岛三】我有一个望远镜~ 中回复
world.onPress(async ({ button, entity }) => {
if (button == Box3ButtonType.CROUCH) {
entity.player.cameraMode = Box3CameraMode.FPS
entity.player.enableJump = false
entity.player.cameraFovY = 0.1
}
})
world.onRelease(async ({ button, entity }) => {
if (button == Box3ButtonType.CROUCH) {
entity.player.cameraMode = Box3CameraMode.FOLLOW
entity.player.enableJump = true
entity.player.cameraFovY = 0.25
}
})
@全能代码师 CS用这段吧()
2022-05-29T11:35:36 点赞:0
在 box3.0求助 中回复
if(num = 0)
//这里有问题,"="是赋值,"=="才是相等,"==="是严格相等
//这段代码应该改为
if(num == 0)
//或
if(num === 0)
//或
if(!num)2022-06-07T21:18:27 点赞:1
在 https://box3.fun/e/b984d677ea1350f5c77b 中回复
给你加了个“/tp ...”和“/tp ... to ...”指令~()()()
2022-06-11T22:59:42 点赞:0
在 。。。。。 中回复
不一定是语法错误,用instanceof来分辨
可以这样写
if (message.startsWith("$")) {
if (!entity.isPlayer || message[0] != '$') return;
const code = message.trim().slice(1);
try {
world.say('~>' + eval(code));
}
catch (e) {
if (e instanceof SyntaxError)
world.say('语法错误\n' + e);
else if(e instanceof InternalError)
world.say('内部错误(一般是死循环或者爆栈)\n' + e);
else if(e instanceof RangeError)
world.say('值不在集合中\n' + e);
else if(e instanceof ReferenceError)
world.say('引用错误\n' + e);
else if(e instanceof TypeError)
world.say('类型错误\n' + e);
else
world.say(e);
}
}2022-06-14T19:59:02 点赞:2
在 全能代码师必看doge【代码】求助 中回复
给你读一下你这for循环的意思:
初始值设定i为3,当i小于等于0的时候才能继续循环,每次循环过后i的值要减0.1
()()()
2022-06-30T22:45:43 点赞:0