Search found 16 matches

by charris456
26 Feb 2012, 21:00
Forum: SFS2X Questions
Topic: Best way to handle in game items.
Replies: 2
Views: 747

Re: Best way to handle in game items.

Hi. Well, it depends on what items you're going to store. For example, in a MMORPG, usually the items usually have some bonuses (which resulted from some kind of crafting) which are random and different from player to player. If your game will have items like that, so your strategy won't work, spec...
by charris456
26 Feb 2012, 01:48
Forum: SFS2X Questions
Topic: Best way to handle in game items.
Replies: 2
Views: 747

Best way to handle in game items.

I'm about to get to the point where I'm going to need to setup items that have various values. I have a pretty good idea on how to handle them client side, but I was wondering what is the best way to handle them server side? Here's the way I thought of having them.. 1. Each item has an id. 2. A list...
by charris456
24 Feb 2012, 02:16
Forum: SFS2X C# API
Topic: Non-Local User Connection Issues (Port is Open)
Replies: 2
Views: 1387

Re: Non-Local User Connection Issues (Port is Open)

This issue was actually caused by the Unity Editor. I had set the serverIP variable to public, and when I was first testing it was set to 127.0.0.1. When we tested it remotely, I changed the serverIP variable in the script, but not in the editor. For some reason the editor was overwriting it with 12...
by charris456
21 Feb 2012, 04:54
Forum: SFS2X C# API
Topic: Non-Local User Connection Issues (Port is Open)
Replies: 2
Views: 1387

Non-Local User Connection Issues (Port is Open)

I have ran into another problem that I can't figure out. I can connect to the server locally just fine. I have configured the smartfox server to add the appropriate IP's. I have updated the IP in the connection script in Unity. I have double checked through a port check tool that my router is allowi...
by charris456
19 Feb 2012, 20:55
Forum: SFS2X Questions
Topic: UserVariables Null after Logging in Second Time
Replies: 3
Views: 895

Re: UserVariables Null after Logging in Second Time

I'm sorry, I found my problem. The nullReference was caused when I was getting variables for a playerID that was passed in the request. Unfortunately, I was using the wrong method to get the remote playerID on the client. I was using remoteuser.PlayerId, which was always zero for some reason. Well i...
by charris456
19 Feb 2012, 20:28
Forum: SFS2X Questions
Topic: UserVariables Null after Logging in Second Time
Replies: 3
Views: 895

Re: UserVariables Null after Logging in Second Time

In unity I have this for Disconnect: void OnApplicationQuit(){ sfs.Disconnect(); } For connecting I have: sfs.Connect(serverIP, serverPort); Debug.Log("Connecting to Server."); This gets called once, when the application starts. I am seeing in the server console that the session is removed...
by charris456
19 Feb 2012, 19:29
Forum: SFS2X Questions
Topic: UserVariables Null after Logging in Second Time
Replies: 3
Views: 895

UserVariables Null after Logging in Second Time

Hello, When a character signs in they are assigned various UserVariables. The first time they sign in they are assigned correctly, and the server gets the expected results from the variables. Everything is fine. But, If a client disconnects, then reconnects, (UserVariables are assigned again), all o...
by charris456
19 Feb 2012, 19:12
Forum: SFS2X C# API
Topic: NullReferenceException when sending ObjectMessage
Replies: 2
Views: 1742

Re: NullReferenceException when sending ObjectMessage

Yes, I had tried that as well. I ended up just going a different route. Client sends request, and then server broadcasts it to everyone in the room through a room list. I have not got to upgrade to 1.0 yet, but I plan to later today.
by charris456
15 Feb 2012, 22:32
Forum: SFS2X C# API
Topic: Question on SFSArray
Replies: 3
Views: 3100

Re: Question on SFSArray

case "charList": Debug.Log("Got Char List"); ISFSObject dt = (SFSObject)evt.Params["params"]; SFSArray chars = dt.GetSFSArray("chars"); string test = chars.GetSFSObject(0).GetUtfString("char_name"); Debug.Log(test); break; Thank you very much for yo...
by charris456
09 Feb 2012, 17:44
Forum: SFS2X C# API
Topic: Question on SFSArray
Replies: 3
Views: 3100

Question on SFSArray

Hello, I was playing around with getting data from a database, and followed the "Recipe #2" on http://docs2x.smartfoxserver.com/DevelopmentBasics/database-recipes. On the server I have successfully queried the database, and got the result I was expecting, here is the code: PreparedStatemen...
by charris456
07 Feb 2012, 04:07
Forum: SFS2X C# API
Topic: NullReferenceException when sending ObjectMessage
Replies: 2
Views: 1742

NullReferenceException when sending ObjectMessage

Full error: NullReferenceException: Object reference not set to an instance of an object Sfs2X.Requests.GenericMessageRequest.ExecuteObjectMessage (Sfs2X.SmartFox sfs) Sfs2X.Requests.GenericMessageRequest.Execute (Sfs2X.SmartFox sfs) Sfs2X.SmartFox.Send (IRequest request) LoginScript.Update () (at A...
by charris456
05 Feb 2012, 03:43
Forum: SFS2X C# API
Topic: Remote Player in Unity
Replies: 6
Views: 2937

In fact, after just looking at the code again, it should not work, since I'm getting the first value in the result array (0), which should be the account id. If anyone has any ideas why this is working, and what I'm doing wrong, I'd be most appreciative. EDIT: Nevermind, just double checked and (0) ...
by charris456
05 Feb 2012, 03:38
Forum: SFS2X C# API
Topic: Remote Player in Unity
Replies: 6
Views: 2937

It was actually quite frustrating, until I made two simple changes.. Here is the code I used in my extension login handler: package com.warstruck.extension; import java.sql.SQLException; import java.sql.Connection; import java.sql.ResultSet; import java.sql.PreparedStatement; import com.smartfoxserv...
by charris456
04 Feb 2012, 11:39
Forum: SFS2X C# API
Topic: Remote Player in Unity
Replies: 6
Views: 2937

Thanks Jake! That sounds better than my idea.

BTW, I got started with your tutorials. Then went on to create a login extension using a database. Going to start with movement next, and wanted to go ahead and get a way to identify remote objects created.

Thanks again!
by charris456
03 Feb 2012, 03:19
Forum: SFS2X C# API
Topic: Remote Player in Unity
Replies: 6
Views: 2937

Actually I figured this out, I think (sorry I didn't do my research hard enough!). I can instantiate the RemotePlayer prefab then set it's name by doing remotePlayer.name = "remote" + ActorNumber; Then I can do a gameObject.find("remote"+ActorNumber) when a remote player position...

Go to advanced search