Hi
I download the mmo demo, and run the server and client, but in client, i not see any npc. And when 2 clients login, they do not see each other in client.
Is there anything else need to set?
From the logs there is a problem in the Extension not starting up.
If I remember correctly the Python Extension did cause some problem for some folks.
Did you make changes to the Extension?
If not, try this simple workaround. In the Zone you're working with (presumably "BasicExample") add the Simple.py extension which is found under the pyTest folder.
If I remember correctly this solves the initialization problem.
I get this issue too. I somehow started the MMORoomDemo.py extension when fiddling around over a period of a few hours but was not sure what specific step had enabled the extensions.. as they were in the correct extensions/pyTest folder as instructed.
Now its working on first test server.... I get this when the extension loads...
14:17:11,547 INFO [SFSWorker:Sys:4] Extensions - {pyTest}: MMO Item Tester: 1.02
But on a second server I could not work out how to start the extension so the test logins show each avatar separately and no NPCs... I saw this message though...
Issue was that I had corrupted Simple.py which was missing a proper line ending on the last line of the file. Maybe done while transferring the setup and files from one server to the other during testing. I restored extensions/pyTest/Simple.py to the SFS original (which has the proper line ending on the last line of the code) ad it works now.
I will leave this here in case others see a similar problem. I am not quite sure why Simple.py is being checked at all as its not listed in the client side code as an extension, but maybe all extensions load someone.
If you want we also provide the Java version of the MMODemo extension.
Python can be practical for quick tests without recompiling but it has its own quirks and not everyone likes it.
I seem to be able to run fine now with the .py extension and using the provided demo code with some minor changes as a test for changing area of interest, etc. And when using the default Zone (BasicExamples) and Room (UnityMMODemo) but when I try to use a new Zone (already set up) and Room (will be dynamically created) it reports the room created is not an MMO Room, which I see others have come across as an issue, so I will trawl the forums for that too.
Last edited by aiaustin on 15 Sep 2015, 17:18, edited 1 time in total.
I can use the default basicExamples zone and a the default UnityMMODEmno or a customized room name there. but once I try to use a new (pre-established zone) with (apparently) exactly the same settings in all tabs as BasicExamples.. all hell breaks loose and I start on every load to get errors on restarting the server - to ensure the room with NPCs in it is not present. I seem to have to go to a saved copy of the Zone .xml files to be able to restart SFS2X without this stratup error.. and that's before I try to run the Unity app and connect.
19:39:32,777 INFO [main] managers.SFSRoomManager - Room created: { Zone: I-Zone }, [ Room: I-Room, Id: 1, Group: default, isGame: false ]
19:39:33,431 INFO [main] Extensions - {pyTest}: MMO Item Tester: 1.02
19:39:33,443 WARN [main] extensions.PythonExtension - Failed initializing Python Extension: pyTest -> Traceback (innermost last):
File "<string>", line 98, in init
File "<string>", line 119, in simulatePlayers
at com.smartfoxserver.v2.api.SFSApi.createNPC(SFSApi.java:690)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
There are much longer sets of errors when running the Unity app itself, as below. But if we could explain why the zone .xml files seem to get messed up as above that would be a start.
I would double check the Room you're working with because it doesn't seem an MMO Room.
The error is pretty clear and there can't be other reasons why it is raised.
Try catching the SFSRuntimeException in your code and trace out the Room, so you can see what class it is.
Once this is fixed the 2nd error should definitely go away and let us know about the first one.
It is odd.. and I have even returned to a pristine copy of the .py extension and the SFS2X demo unity example. So the room is just a newly cerate one under BasicExamples Zone as in the example code. And on one machine I even built a fresh SFSX2 server. And tried 32 bit and 64 bit servers. All fail the same way now. yet at one stage it did work It must be something cached or set in the configs somewhere.