問題タブ [smartfoxserver]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
633 参照

java - プロジェクトで gson を使用しようとすると、NoClassDefFoundError com/google/gson/Gson が発生する

SmartFoxServer の拡張機能として使用するために、gson を Java プロジェクトに追加しました。次の行を追加するだけの場合:

その後、拡張機能をエクスポートすると、SFS コンソールに次のエラーが表示されます。

例外: java.lang.NoClassDefFoundError メッセージ: com/google/gson/Gson

オンラインで見つけたいくつかの解決策を試しましたが、何もうまくいかないようです。シリアル化/逆シリアル化を実行できる他の JSON ライブラリへのアドバイスや参照をいただければ幸いです。

0 投票する
1 に答える
167 参照

haxe - Haxe not connecting to SmartFoxServer PRO 1.6.6

I'm working on a project in Haxe which requires a connection to the SmartFoxServer. I installed SFS Pro (localhost:8080 opens and displays the intro page fine). I haven't modified the config files either.

Client-side, I try running SmartFoxClient.connect([my ip], 9339). After the line with connect, nothing runs and the listener SFSEvent.onConnection is never called.

I compile with haxe -main New -swf whatever.swf -swf-lib SmartFoxClient.swf -swf-lib SFSEvent.swf. The compilation runs fine, but the output of the traces is only `sfs.properties (which is null) and "Connecting Started.."

I tried using the similar code in Flash (that is the same exact functions) and it connected fine.

My question is if anyone has done this without porting the entire code of SFS to Haxe (which I unsuccessfully tried with as3hx), what did they do differently?

0 投票する
1 に答える
861 参照

unity3d - 動的な部屋の Smartfox の例 (tris) が機能しない

smartfox サーバーの tris サンプルの実行に問題があります。サイトには インストール手順があります。ゲームは動的な部屋を作成しますが、ゾーン モニター モジュールをチェックして新しく作成された部屋を監視すると、部屋の拡張タブが無効になります。ログには、SFSextension 例外も表示されます。

com.smartfoxserver.v2.exceptions.SFSExtensionException: 拡張機能を呼び出せません: { Zone: BasicExamples }

例 a は新しい部屋の延長を作成しますか?

settings.Extension = new RoomExtension(extensionId, extensionClass);

// サイトから取得

拡張機能を呼び出せないのはなぜですか? それとも、何かを逃しただけですか?


その他の注意事項:

x64 Windows

Java 1.8_25 (jdk と jre の両方)

サーバーのバージョン: 2.9.0

Google Chrome バージョン: 39.0.2171.99 m

ありがとうございました。

0 投票する
1 に答える
184 参照

c# - Unity を Web Player モードで使用する場合の VerificationException

Unity3D と SmartFox を使用する Web プロジェクトに取り組んでいますが、特定の設定に問題があります。エディターが「Web Player」に設定されている場合は常に、次の例外が発生します。

2行目にスローされます:

(そして、その行を省略すると、サーバー変数からメソッドを呼び出すたびにスローされます)

スタンドアロン モードでビルドすると機能します。別の同僚のコンピューター (Web モード) でも動作しますが、プロジェクトの設定に違いは見つかりません。

例外について読んでもあまり役に立ちませんでしたが、検証できないコードを記述して安全な (?) バイナリにコンパイルしようとすると例外がスローされます。エラーの他の部分については他に何も見つかりませんでした。