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
Plus EMU Input string was not in a correct format.
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="JayC" data-source="post: 414367" data-attributes="member: 36373"><p>Yes it does have a fix..</p><p></p><p>RoomData.cs Line 87:</p><p>[CODE] if (!string.IsNullOrEmpty(Row["users_now"].ToString()))</p><p> UsersNow = Convert.ToInt32(Row["users_now"]);</p><p> else</p><p> UsersNow = 0;[/CODE]</p><p></p><p>Change to this:</p><p>[CODE]</p><p>int intUsers;</p><p> if(!string.IsNullOrEmpty(Row["users_now"].ToString()) && Int32.TryParse(Row["users_now"].ToString(), out intUsers))</p><p> UsersNow = intUsers;</p><p> else</p><p> UsersNow = 0;</p><p>[/CODE]</p><p></p><p>It could be faulting because the first code is testing to see if the string is Null or Empty, but then it doesn't check to see if its a valid integer when parsing. The 2nd code will do both.</p><p></p><p>After doing the above you can run these queries as well:</p><p>[CODE]ALTER TABLE `rooms` CHANGE `allow_pets` `allow_pets` INT(1) NOT NULL DEFAULT '0', CHANGE `allow_pets_eat` `allow_pets_eat` INT(1) NOT NULL DEFAULT '0', CHANGE `room_blocking_disabled` `room_blocking_disabled` INT(1) NOT NULL DEFAULT '0', CHANGE `allow_hidewall` `allow_hidewall` INT(1) NOT NULL DEFAULT '0', CHANGE `mute_settings` `mute_settings` INT(1) NOT NULL DEFAULT '1', CHANGE `ban_settings` `ban_settings` INT(1) NOT NULL DEFAULT '1', CHANGE `kick_settings` `kick_settings` INT(1) NOT NULL DEFAULT '1';[/CODE]</p></blockquote><p></p>
[QUOTE="JayC, post: 414367, member: 36373"] Yes it does have a fix.. RoomData.cs Line 87: [CODE] if (!string.IsNullOrEmpty(Row["users_now"].ToString())) UsersNow = Convert.ToInt32(Row["users_now"]); else UsersNow = 0;[/CODE] Change to this: [CODE] int intUsers; if(!string.IsNullOrEmpty(Row["users_now"].ToString()) && Int32.TryParse(Row["users_now"].ToString(), out intUsers)) UsersNow = intUsers; else UsersNow = 0; [/CODE] It could be faulting because the first code is testing to see if the string is Null or Empty, but then it doesn't check to see if its a valid integer when parsing. The 2nd code will do both. After doing the above you can run these queries as well: [CODE]ALTER TABLE `rooms` CHANGE `allow_pets` `allow_pets` INT(1) NOT NULL DEFAULT '0', CHANGE `allow_pets_eat` `allow_pets_eat` INT(1) NOT NULL DEFAULT '0', CHANGE `room_blocking_disabled` `room_blocking_disabled` INT(1) NOT NULL DEFAULT '0', CHANGE `allow_hidewall` `allow_hidewall` INT(1) NOT NULL DEFAULT '0', CHANGE `mute_settings` `mute_settings` INT(1) NOT NULL DEFAULT '1', CHANGE `ban_settings` `ban_settings` INT(1) NOT NULL DEFAULT '1', CHANGE `kick_settings` `kick_settings` INT(1) NOT NULL DEFAULT '1';[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Plus EMU Input string was not in a correct format.
Top