where is the sendResponse?

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
theotanaka
Posts: 6
Joined: 17 Sep 2010, 14:13
Location: Programmer/ Designer

where is the sendResponse?

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
theotanaka
Posts: 6
Joined: 17 Sep 2010, 14:13
Location: Programmer/ Designer

Post 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?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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" 
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply