I have stumbled onto an issue, and don't know where to turn next... I was wondering if any one knows what may cause my issue...
Earlier today, I was creating extensions for my game. I was running tests, with a working system... Everything was working great, and then all of the sudden my server computer crashed and restarted itself.
Ever since the crash, my Unity Client does not receive the data sent through the extensions. (Nothing was changed in the code, at all, to cause this.)
What I have done to try to fix the issue:
- Reinstalled Smartfox 2x / Unity3D
- Replaced the .dll plugin for SmartFox, into Unity assets.
- Checked network settings (ports ect)
- Software settings
- (re)Scripted my entire client-side code, with bare minimum to work
- (re)Scripted my extensions
Nothing seems to "re-enable" what was working prior to the crash.
The custom login system continues to work though, which is odd because they are all in the same .jar file... (lol) It checks the database for correct login name and password, and it seems unaffected.
(Client and server computer are different boxes.)
Also note, when the server crashed: it locked up my Unity client so I had to do a force shutdown with CTRL+Delete->End process.
The Smartfox server trace shows that the data is being processed, and it "says" that it is sending the data (through a trace).
Any help would be great.
Unity acts like it's not receiving extentions
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
ThomasLund wrote:Did you upgrade to rc1a SFS2X server?
Yeah, I did. I am a big fan of staying up to date! (hehe)
My first thoughts were that I skrewed something up with my code, because I was changing it around; testing new things... But I have brought it down to the bare basics to work, and still nothing.
I have debug/traces on all of the steps in the program, and I can follow it; but the client simply does not receive the data.
Is there a way that I could check to see if this line of code is actually sending data?
Code: Select all
this.send("myExtension", objectToClient, sender);
I have a trace before and after it, both say that the data is "there" to be sent; and I am assuming that it IS triggering because of the execution of the trace afterwards.
Let me post the small bit of code that I am using, to see if any of you can find a flaw that I am simply not seeing myself.
extension handler:
extension:
receiver script in Unity3D:
I know that sometimes I will capitalize a letter somewhere, that will screw everything up... But I don't see any place that anything like this is occurring in this small amount of script.
extension handler:
Code: Select all
addRequestHandler("myExtension", myExtension.class);
extension:
Code: Select all
public void handleClientRequest(User sender, ISFSObject params)
{
trace("Sent...");
ISFSObject objectToClient = SFSObject.newInstance();
objectToClient.putInt("numbers", 12345);
objectToClient.putUtfString("text", "ThisIsATest");
this.send("thisExtension", objectToClient, sender);
trace("Sent... objectToClient: " + objectToClient);
}
receiver script in Unity3D:
Code: Select all
smartFox.AddEventListener(SFSEvent.EXTENSION_RESPONSE, OnExtensionResponse);
Code: Select all
private void OnExtensionResponse(BaseEvent evt)
{
try
{
cmd = (string)evt.Params["cmd"];
ISFSObject someParam = (SFSObject)evt.Params["params"];
if (cmd == "thisExtension")
{
Debug.Log("thisExtension returned...");
numbers = someParam.GetInt("numbers");
text = someParam.GetUtfString("text ");
Debug.Log("Data received: numbers = " + numbers + " and text = " + text);
}
catch (Exception e)
{
Debug.Log("Exception handling response: " + e.Message + " >>> " + e.StackTrace);
}
Debug.Log("Something was caught ...");
}
I know that sometimes I will capitalize a letter somewhere, that will screw everything up... But I don't see any place that anything like this is occurring in this small amount of script.
Who is online
Users browsing this forum: No registered users and 66 guests