Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Degree of Protection (PlusEmu)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="RobinLA" data-source="post: 465831" data-attributes="member: 97285"><p>I already tried this, but it isn't working.</p><p></p><p>You mean like this? :</p><p>[CODE=csharp]namespace Bobba.HabboRoleplay.Web</p><p>{</p><p> public class RoleplayUser</p><p> {</p><p> // Client Info</p><p> public GameClient Client;</p><p></p><p> public RoleplayUser(GameClient Client)</p><p> {</p><p> // Client Info</p><p> this.Client = Client;</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p>Then I got in this code:</p><p></p><p>[CODE=csharp]public IWebSocketConnection WebSocketConnection</p><p> {</p><p> get</p><p> {</p><p> if (PlusEnvironment.GetGame().GetWebEventManager() != null)</p><p> return PlusEnvironment.GetGame().GetWebEventManager().GetUsersConnection(RoleplayUser.Client);</p><p> else</p><p> return null;</p><p> }</p><p> }[/CODE]</p><p>this error:</p><p>[ATTACH=full]11732[/ATTACH]</p><p>English: The non-static field, method, or property "RoleplayUser.Client" must have an object reference.</p><p></p><p>And I saw the same code in the HoloRP Emulator (Plus) and there is also "GameClient client" and not "public GameClient Client" and it works.</p><p>And the C# Class RoleplayUser is already public - so that's the reason why I don't know what's the problem/why it isn't working..</p></blockquote><p></p>
[QUOTE="RobinLA, post: 465831, member: 97285"] I already tried this, but it isn't working. You mean like this? : [CODE=csharp]namespace Bobba.HabboRoleplay.Web { public class RoleplayUser { // Client Info public GameClient Client; public RoleplayUser(GameClient Client) { // Client Info this.Client = Client; } } } [/CODE] Then I got in this code: [CODE=csharp]public IWebSocketConnection WebSocketConnection { get { if (PlusEnvironment.GetGame().GetWebEventManager() != null) return PlusEnvironment.GetGame().GetWebEventManager().GetUsersConnection(RoleplayUser.Client); else return null; } }[/CODE] this error: [ATTACH type="full" width="622px" alt="Bildschirmfoto 2020-12-08 um 12.42.20.png"]11732[/ATTACH] English: The non-static field, method, or property "RoleplayUser.Client" must have an object reference. And I saw the same code in the HoloRP Emulator (Plus) and there is also "GameClient client" and not "public GameClient Client" and it works. And the C# Class RoleplayUser is already public - so that's the reason why I don't know what's the problem/why it isn't working.. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Degree of Protection (PlusEmu)
Top