Page 1 of 1

where is the sendResponse?

Posted: 20 Sep 2010, 20:08
by theotanaka
I'm trying to compile my source, but it's complaining that it can't find the symbol.


javac -classpath "../lib/jysfs.jar:../lib/json.jar:../lib/json-lib-2.1-jdk15.jar" SimpleExtension.java

SimpleExtension.java:87: cannot find symbol
symbol : method sendResponse(it.gotoandplay.smartfoxserver.lib.ActionscriptObject,int,<nulltype>,it.gotoandplay.smartfoxserver.data.User)
location: class SimpleExtension
sendResponse(response, -1, null, u);
^
1 error


I copied the compiling syntax from the documentation. Am I missing one of the jars? I couldn't find what each jar contained.

Thanks for the attention,
Theo

Posted: 22 Sep 2010, 12:12
by Lapo
I think the problem is not with the missing jar but with the signature of the method you are using. Please double check the parameters required by the sendResponse call in the javadocs

Posted: 23 Sep 2010, 17:41
by theotanaka
Oh, I wasn't using the signature correctly, I was trying to send one user object, when I was supposed to send a likedlist with all the users.

I have a doubt now, and I can't find anywhere. I'm trying to load SFSTris2.java instead of sfsTris.as, but my server keeps telling me that it can't find the class. What's the correct syntax for this? Now I'm trying:

xt.name = "tris"
xt.script = "it/gotoandplay/extensions/examples/SFSTris2.java"

gameRoom.extension = xt

smartfox.createRoom(gameRoom)


And my server is giving me this error:

Error: java.lang.ClassNotFoundException

What's the correct syntax?

Posted: 24 Sep 2010, 08:12
by Lapo
In this case you should use the fully qualified name of the class, which is:

Code: Select all

xt.script = "it.gotoandplay.extensions.examples.SFSTris2"