我正在尝试在oscP5库中扩展TcpClient类以进行处理。我已经在我的主草图中导入了netP5。*和oscP5。*。但是,以下代码会产生此错误:期待TRIPLE_DOT,找到','。我如何扩展它有什么问题?我应该在构造函数中添加所有这些参数吗?
class GameClient extends netP5.TcpClient {
int score;
//some more variables
public TcpClient(Object theObject, String, theAddress, int thePort) {
//This is the constructor.
}
//I want to override this function
public void dispose() {
println("dispose() called.");
}
}
感谢您的帮助。
答案 0 :(得分:0)
请看你的例子:
public TcpClient(Object theObject, String,theAddress,int thePort){
String
和theAddress
之间有逗号,不属于那里。