我试图创建一个连接到IRC的java机器人,然后当用户键入命令时,它“滚动骰子”但它似乎无法正常工作
cannot find symbol variable IntRoll
illegal start of type
cannot find symbol variable OpRoll
illegal start of type
cannot find symbol variable Op
cannot find symbol variable IntRoll
illegal start of type
cannot find symbol variable OpRoll
illegal start of type
cannot find symbol variable Op
cannot find symbol variable Op
cannot find symbol variable generator
int cannot be dereferenced
cannot return a value from method whose result type is void
int cannot be dereferenced
cannot return a value from method whose result type is void
cannot return a value from method whose result type is void
cannot return a value from method whose result type is void
cannot find symbol variable generator
cannot find symbol variable InRoll
cannot return a value from method whose result type is void
cannot find symbol variable InRoll
cannot return a value from method whose result type is void
cannot return a value from method whose result type is void
这是两个文件, http://pastebin.com/c47RqRsd http://pastebin.com/v4Y42uF4
答案 0 :(得分:1)
roll
的问题:
InRoll
。InRoll == someNumber
。void
,则无法在方法中返回值。 InRoll
的字段,因此您无法在onMessage
方法中使用它。 Dice4Cash
的问题:
IntRoll
字段,也不会创建OpRoll
字段。我强烈建议您逐步学习一些Java教程并学习语言
Getting Started。
Learning the Java Language