为什么我的游戏没有运行? [英] Why is my game not running?
本文介绍了为什么我的游戏没有运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在关注youtube上的教程:链接。我的代码中没有错误或错误,因此当我运行项目时,JFrame正常但空白。控制台弹出并说出以下内容:
I am following a tutorial on youtube: Link . There is no error or bugs in my code, so when I run the project The JFrame comes normally but blank. The console pops up and says the following:
<java.lang.IllegalArgumentException: timeout value is negative
at java.lang.Thread.sleep(Native Method)
at Main.GamePanel.run(GamePanel.java:73)
at java.lang.Thread.run(Thread.java:680)
什么可以我这样做?
-Naji Awad
What can I do?
-Naji Awad
推荐答案
从错误消息中看起来你的某个地方你有一个带负值的超时参数。您将不得不单步执行代码以找出抛出此错误的确切位置,然后修复参数的值。
From the error message it looks like somewhere you have a timeout argument with a negative value. You will have to step through your code to find out exactly where this error is thrown then fix the value of the argument.
这篇关于为什么我的游戏没有运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文