Java随机坐标错误?
我似乎无法理解我遇到的这个错误。我已经为随机数创建了一个单独的类,导入它并启动它,但它说我不能使用它?
Compiling loginserver...
src\com\rs2hd\net\ActionSender.java:745: sendCreateObject(int,int,int,int,int,in
t) in com.rs2hd.net.ActionSender cannot be applied to (int)
player.getActionSender().sendCreateObject(randomElement)
;
^
randomElement =
I cannot seem to understand this error I'm getting. I've made a seperate class for random numbers, imported it and initiated it, but It say's I cannot use it?
Compiling loginserver...
src\com\rs2hd\net\ActionSender.java:745: sendCreateObject(int,int,int,int,int,in
t) in com.rs2hd.net.ActionSender cannot be applied to (int)
player.getActionSender().sendCreateObject(randomElement)
;
^
randomElement =
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的
sendCreateObject
被声明为采用 6 个整数作为参数。在你的行中,你只给它一个!
举个例子,下面的代码给出了完全相同的错误消息:
Your
sendCreateObject
is declared to take 6 integers as arguments. In your lineyou're only giving it one!
To give you an example, the code below gives the exact same error message: