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
Invalid Session Ticket
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="Cablink" data-source="post: 66801" data-attributes="member: 2330"><p>Hello there, I own a v26 Roleplay hotel, based off of Obbo emulator, and when I try logging on the client it says:</p><p><img src="http://img641.imageshack.us/img641/1759/8feb3b46512944e3b61fb94.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>On my emulator it says this:</p><p><img src="http://img713.imageshack.us/img713/3740/8e45b91664b8492aa19f8e8.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p> </p><p>In DC.ERR it says this:</p><p>System.NullReferenceException: Object reference not set to an instance of an object.</p><p>at Holo.Managers.rankManager.fuseRights(Byte rankID, Int32 userID) in C:\Documents and Settings\Owner\Desktop\StreetRP Emulator\Source\Managers\rankManager.cs:line 91</p><p>at Holo.Virtual.Users.virtualUser.processPacket(String currentPacket) in C:\Documents and Settings\Owner\Desktop\StreetRP Emulator\Source\Virtual\Users\virtualUser.cs:line 519</p><p>at Holo.Virtual.Users.virtualUser.dataArrival(IAsyncResult iAr) in C:\Documents and Settings\Owner\Desktop\StreetRP Emulator\Source\Virtual\Users\virtualUser.cs:line 328</p><p>MY RANKMANAGER.CS:</p><p> </p><p>______</p><p>[CODE]using System;</p><p>using System.Data;</p><p>using System.Text;</p><p>using System.Collections;</p><p>using System.Threading;</p><p>using Ion.Storage;</p><p> </p><p>namespace Holo.Managers</p><p>{</p><p> /// <summary></p><p> /// Provides information about the various user ranks/levels, aswell as ranks for games such as 'BattleBall' and 'SnowStorm'.</p><p> /// </summary></p><p> public static class rankManager</p><p> {</p><p> private static Hashtable userRanks;</p><p> private static gameRank[] gameRanksBB;</p><p> private static gameRank[] gameRanksSS;</p><p> private static gameRank[] gameRanksWS;</p><p> </p><p> /// <summary></p><p> /// Initializes the various user ranks, aswell as the ranks for games such as 'BattleBall' and 'SnowStorm'.</p><p> /// </summary></p><p> public static void Init(bool Update)</p><p> {</p><p> Out.WriteLine("Intializing user rank fuserights...");</p><p> userRanks = new Hashtable();</p><p> </p><p> for (byte b = 1; b <= 8; b++)</p><p> userRanks.Add(b, new userRank(b));</p><p> </p><p> Out.WriteLine("Fuserights for 8 ranks loaded.");</p><p> Out.WriteBlank();</p><p> </p><p> Out.WriteLine("Initializing game ranks...");</p><p> </p><p> DataTable dTable;</p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p> dTable = dbClient.getTable("SELECT title, minpoints, maxpoints FROM games_ranks WHERE type = 'bb' ORDER BY id ASC");</p><p> }</p><p> gameRanksBB = new gameRank[dTable.Rows.Count];</p><p> int i = 0;</p><p> foreach (DataRow dRow in dTable.Rows)</p><p> {</p><p> gameRanksBB[i] = new gameRank(Convert.ToString(dRow["title"]), Convert.ToInt32(dRow["minpoints"]), Convert.ToInt32(dRow["maxpoints"]));</p><p> i++;</p><p> }</p><p> Out.WriteLine("Loaded " + gameRanksBB.Length + " ranks for game 'BattleBall'.");</p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p> dTable = dbClient.getTable("SELECT title, minpoints, maxpoints FROM games_ranks WHERE type = 'ss' ORDER BY id ASC");</p><p> }</p><p> </p><p> gameRanksSS = new gameRank[dTable.Rows.Count];</p><p> i = 0;</p><p> foreach (DataRow dRow in dTable.Rows)</p><p> {</p><p> gameRanksSS[i] = new gameRank(Convert.ToString(dRow["title"]), Convert.ToInt32(dRow["minpoints"]), Convert.ToInt32(dRow["maxpoints"]));</p><p> i++;</p><p> }</p><p> Out.WriteLine("Loaded " + gameRanksSS.Length + " ranks for game 'SnowStorm'.");</p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p> dTable = dbClient.getTable("SELECT title, minpoints, maxpoints FROM games_ranks WHERE type = 'ws' ORDER BY id ASC");</p><p> }</p><p> gameRanksWS = new gameRank[dTable.Rows.Count];</p><p> i = 0;</p><p> foreach (DataRow dRow in dTable.Rows)</p><p> {</p><p> gameRanksWS[i] = new gameRank(Convert.ToString(dRow["title"]), Convert.ToInt32(dRow["minpoints"]), Convert.ToInt32(dRow["maxpoints"]));</p><p> i++;</p><p> }</p><p> //fOut.WriteLine("Loaded " + gameRanksWS.Length + " ranks for game 'Wobble Squabble'.");</p><p> </p><p> if (Update)</p><p> Thread.CurrentThread.Abort();</p><p>}</p><p> /// <summary></p><p> /// Returns the fuserights string for a certain user rank.</p><p> /// </summary></p><p> /// <param name="rankID">The ID of the user rank.</param></p><p> /// <param name="userID">The ID of the user.</param></p><p> public static string fuseRights(byte rankID, int userID)</p><p> {</p><p> string[] fuseRights = ((userRank)userRanks[rankID]).fuseRights;</p><p> StringBuilder strBuilder = new StringBuilder();</p><p> </p><p> for (int i = 0; i < fuseRights.Length; i++)</p><p> strBuilder.Append(fuseRights[i] + Convert.ToChar(2));</p><p> </p><p> foreach (string fuseright in userManager.getUser(userID)._fuserights)</p><p> strBuilder.Append(fuseright);</p><p> </p><p> return strBuilder.ToString();</p><p> }</p><p> </p><p> /// <summary></p><p> /// Returns a bool that indicates if a certain user has a certain fuseright.</p><p> /// </summary></p><p> /// <param name="rankID">The ID of the user rank.</param></p><p> /// <param name="fuseRight">The fuseright to look for.</param></p><p> /// <param name="userID">The ID of the user.</param></p><p> public static bool containsRight(byte rankID, string fuseRight, int userID)</p><p> {</p><p> userRank objRank = ((userRank)userRanks[rankID]);</p><p> for (int i = 0; i < objRank.fuseRights.Length; i++)</p><p> if (objRank.fuseRights[i] == fuseRight)</p><p> return true;</p><p> return userManager.getUser(userID)._fuserights.Contains(fuseRight);</p><p> }</p><p> </p><p> /// <summary></p><p> /// Returns a bool that indicates if a certain user has a certain fuseright.</p><p> /// </summary></p><p> /// <param name="rankID">The ID of the user rank.</param></p><p> /// <param name="fuseRight">The fuseright to look for.</param></p><p> /// <returns></returns></p><p> public static bool containsRankRight(byte rankID, string fuseRight)</p><p> {</p><p> userRank objRank = ((userRank)userRanks[rankID]);</p><p> for (int i = 0; i < objRank.fuseRights.Length; i++)</p><p> if (objRank.fuseRights[i] == fuseRight)</p><p> return true;</p><p> return false;</p><p> }</p><p> </p><p> public static gameRank getGameRank(bool isBattleBall, string Title)</p><p> {</p><p> gameRank[] Ranks = null;</p><p> if (isBattleBall)</p><p> Ranks = gameRanksBB;</p><p> else</p><p> Ranks = gameRanksSS;</p><p> </p><p> foreach (gameRank Rank in Ranks)</p><p> if (Rank.Title == Title)</p><p> return Rank;</p><p> </p><p> return new gameRank("holo.cast.gamerank.null", 0, 0);</p><p> }</p><p> /// <summary></p><p> /// Returns the game rank title as a string for a certain game type ('BattleBall' or 'SnowStorm') and score.</p><p> /// </summary></p><p> /// <param name="isBattleBall">Specifies if to lookup a 'BattleBall' game. If false, then the rank for a 'SnowStorm' game will be returned.</param></p><p> /// <param name="Score">The score to get the rank for.</param></p><p> public static string getGameRankTitle(bool isBattleBall, int Score)</p><p> {</p><p> gameRank[] Ranks = null;</p><p> if (isBattleBall)</p><p> Ranks = gameRanksBB;</p><p> else</p><p> Ranks = gameRanksSS;</p><p> </p><p> foreach (gameRank Rank in Ranks)</p><p> if (Score >= Rank.minPoints && (Rank.maxPoints == 0 || Score <= Rank.maxPoints))</p><p> return Rank.Title;</p><p> </p><p> return "holo.cast.gamerank.null";</p><p> }</p><p> /// <summary></p><p> /// Represents a user rank.</p><p> /// </summary></p><p> private struct userRank</p><p> {</p><p> internal string[] fuseRights;</p><p> /// <summary></p><p> /// Initializes a user rank.</p><p> /// </summary></p><p> /// <param name="rankID">The ID of the rank to initialize.</param></p><p> internal userRank(byte rankID)</p><p> {</p><p> DataColumn dCol;</p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p> dCol = dbClient.getColumn("SELECT fuseright FROM system_fuserights WHERE minrank <= " + rankID);</p><p> }</p><p> fuseRights = dataHandling.dColToArray(dCol);</p><p> }</p><p> }</p><p> /// <summary></p><p> /// Represents a game rank, containing the min and max score and the rank name.</p><p> /// </summary></p><p> public struct gameRank</p><p> {</p><p> </p><p> /// <summary></p><p> /// The minimum amount of points of this rank.</p><p> /// </summary></p><p> internal int minPoints;</p><p> /// <summary></p><p> /// The maximum amount of points of this rank.</p><p> /// </summary></p><p> internal int maxPoints;</p><p> /// <summary></p><p> /// The title of this rank.</p><p> /// </summary></p><p> internal string Title;</p><p> /// <summary></p><p> /// Initializes the gamerank with given values.</p><p> /// </summary></p><p> /// <param name="Title">The title of this rank.</param></p><p> /// <param name="minPoints">The minimum amount of points of this rank.</param></p><p> /// <param name="maxPoints">The maximum amount of points of this rank.</param></p><p> internal gameRank(string Title, int minPoints, int maxPoints)</p><p> {</p><p> this.Title = Title;</p><p> this.minPoints = minPoints;</p><p> this.maxPoints = maxPoints;</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>____</p><p>I tried nulling my SSO Ticket, didnt work, I reset USER tables, nothing worked. I switched VPS, nothing worked. I tried, changing DCRS nothing worked, if you can fix this please post below and pm me!</p></blockquote><p></p>
[QUOTE="Cablink, post: 66801, member: 2330"] Hello there, I own a v26 Roleplay hotel, based off of Obbo emulator, and when I try logging on the client it says: [IMG]http://img641.imageshack.us/img641/1759/8feb3b46512944e3b61fb94.png[/IMG] On my emulator it says this: [IMG]http://img713.imageshack.us/img713/3740/8e45b91664b8492aa19f8e8.png[/IMG] In DC.ERR it says this: System.NullReferenceException: Object reference not set to an instance of an object. at Holo.Managers.rankManager.fuseRights(Byte rankID, Int32 userID) in C:\Documents and Settings\Owner\Desktop\StreetRP Emulator\Source\Managers\rankManager.cs:line 91 at Holo.Virtual.Users.virtualUser.processPacket(String currentPacket) in C:\Documents and Settings\Owner\Desktop\StreetRP Emulator\Source\Virtual\Users\virtualUser.cs:line 519 at Holo.Virtual.Users.virtualUser.dataArrival(IAsyncResult iAr) in C:\Documents and Settings\Owner\Desktop\StreetRP Emulator\Source\Virtual\Users\virtualUser.cs:line 328 MY RANKMANAGER.CS: ______ [CODE]using System; using System.Data; using System.Text; using System.Collections; using System.Threading; using Ion.Storage; namespace Holo.Managers { /// <summary> /// Provides information about the various user ranks/levels, aswell as ranks for games such as 'BattleBall' and 'SnowStorm'. /// </summary> public static class rankManager { private static Hashtable userRanks; private static gameRank[] gameRanksBB; private static gameRank[] gameRanksSS; private static gameRank[] gameRanksWS; /// <summary> /// Initializes the various user ranks, aswell as the ranks for games such as 'BattleBall' and 'SnowStorm'. /// </summary> public static void Init(bool Update) { Out.WriteLine("Intializing user rank fuserights..."); userRanks = new Hashtable(); for (byte b = 1; b <= 8; b++) userRanks.Add(b, new userRank(b)); Out.WriteLine("Fuserights for 8 ranks loaded."); Out.WriteBlank(); Out.WriteLine("Initializing game ranks..."); DataTable dTable; using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dTable = dbClient.getTable("SELECT title, minpoints, maxpoints FROM games_ranks WHERE type = 'bb' ORDER BY id ASC"); } gameRanksBB = new gameRank[dTable.Rows.Count]; int i = 0; foreach (DataRow dRow in dTable.Rows) { gameRanksBB[i] = new gameRank(Convert.ToString(dRow["title"]), Convert.ToInt32(dRow["minpoints"]), Convert.ToInt32(dRow["maxpoints"])); i++; } Out.WriteLine("Loaded " + gameRanksBB.Length + " ranks for game 'BattleBall'."); using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dTable = dbClient.getTable("SELECT title, minpoints, maxpoints FROM games_ranks WHERE type = 'ss' ORDER BY id ASC"); } gameRanksSS = new gameRank[dTable.Rows.Count]; i = 0; foreach (DataRow dRow in dTable.Rows) { gameRanksSS[i] = new gameRank(Convert.ToString(dRow["title"]), Convert.ToInt32(dRow["minpoints"]), Convert.ToInt32(dRow["maxpoints"])); i++; } Out.WriteLine("Loaded " + gameRanksSS.Length + " ranks for game 'SnowStorm'."); using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dTable = dbClient.getTable("SELECT title, minpoints, maxpoints FROM games_ranks WHERE type = 'ws' ORDER BY id ASC"); } gameRanksWS = new gameRank[dTable.Rows.Count]; i = 0; foreach (DataRow dRow in dTable.Rows) { gameRanksWS[i] = new gameRank(Convert.ToString(dRow["title"]), Convert.ToInt32(dRow["minpoints"]), Convert.ToInt32(dRow["maxpoints"])); i++; } //fOut.WriteLine("Loaded " + gameRanksWS.Length + " ranks for game 'Wobble Squabble'."); if (Update) Thread.CurrentThread.Abort(); } /// <summary> /// Returns the fuserights string for a certain user rank. /// </summary> /// <param name="rankID">The ID of the user rank.</param> /// <param name="userID">The ID of the user.</param> public static string fuseRights(byte rankID, int userID) { string[] fuseRights = ((userRank)userRanks[rankID]).fuseRights; StringBuilder strBuilder = new StringBuilder(); for (int i = 0; i < fuseRights.Length; i++) strBuilder.Append(fuseRights[i] + Convert.ToChar(2)); foreach (string fuseright in userManager.getUser(userID)._fuserights) strBuilder.Append(fuseright); return strBuilder.ToString(); } /// <summary> /// Returns a bool that indicates if a certain user has a certain fuseright. /// </summary> /// <param name="rankID">The ID of the user rank.</param> /// <param name="fuseRight">The fuseright to look for.</param> /// <param name="userID">The ID of the user.</param> public static bool containsRight(byte rankID, string fuseRight, int userID) { userRank objRank = ((userRank)userRanks[rankID]); for (int i = 0; i < objRank.fuseRights.Length; i++) if (objRank.fuseRights[i] == fuseRight) return true; return userManager.getUser(userID)._fuserights.Contains(fuseRight); } /// <summary> /// Returns a bool that indicates if a certain user has a certain fuseright. /// </summary> /// <param name="rankID">The ID of the user rank.</param> /// <param name="fuseRight">The fuseright to look for.</param> /// <returns></returns> public static bool containsRankRight(byte rankID, string fuseRight) { userRank objRank = ((userRank)userRanks[rankID]); for (int i = 0; i < objRank.fuseRights.Length; i++) if (objRank.fuseRights[i] == fuseRight) return true; return false; } public static gameRank getGameRank(bool isBattleBall, string Title) { gameRank[] Ranks = null; if (isBattleBall) Ranks = gameRanksBB; else Ranks = gameRanksSS; foreach (gameRank Rank in Ranks) if (Rank.Title == Title) return Rank; return new gameRank("holo.cast.gamerank.null", 0, 0); } /// <summary> /// Returns the game rank title as a string for a certain game type ('BattleBall' or 'SnowStorm') and score. /// </summary> /// <param name="isBattleBall">Specifies if to lookup a 'BattleBall' game. If false, then the rank for a 'SnowStorm' game will be returned.</param> /// <param name="Score">The score to get the rank for.</param> public static string getGameRankTitle(bool isBattleBall, int Score) { gameRank[] Ranks = null; if (isBattleBall) Ranks = gameRanksBB; else Ranks = gameRanksSS; foreach (gameRank Rank in Ranks) if (Score >= Rank.minPoints && (Rank.maxPoints == 0 || Score <= Rank.maxPoints)) return Rank.Title; return "holo.cast.gamerank.null"; } /// <summary> /// Represents a user rank. /// </summary> private struct userRank { internal string[] fuseRights; /// <summary> /// Initializes a user rank. /// </summary> /// <param name="rankID">The ID of the rank to initialize.</param> internal userRank(byte rankID) { DataColumn dCol; using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dCol = dbClient.getColumn("SELECT fuseright FROM system_fuserights WHERE minrank <= " + rankID); } fuseRights = dataHandling.dColToArray(dCol); } } /// <summary> /// Represents a game rank, containing the min and max score and the rank name. /// </summary> public struct gameRank { /// <summary> /// The minimum amount of points of this rank. /// </summary> internal int minPoints; /// <summary> /// The maximum amount of points of this rank. /// </summary> internal int maxPoints; /// <summary> /// The title of this rank. /// </summary> internal string Title; /// <summary> /// Initializes the gamerank with given values. /// </summary> /// <param name="Title">The title of this rank.</param> /// <param name="minPoints">The minimum amount of points of this rank.</param> /// <param name="maxPoints">The maximum amount of points of this rank.</param> internal gameRank(string Title, int minPoints, int maxPoints) { this.Title = Title; this.minPoints = minPoints; this.maxPoints = maxPoints; } } } } [/CODE] ____ I tried nulling my SSO Ticket, didnt work, I reset USER tables, nothing worked. I switched VPS, nothing worked. I tried, changing DCRS nothing worked, if you can fix this please post below and pm me! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Invalid Session Ticket
Top