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
Slopt Emulator Soccer.cs Error
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="dimitrisbey" data-source="post: 460140" data-attributes="member: 92493"><p>Hi guys, when I do rebuild my emulator it gives these errors:</p><p>[CODE]Severity Code Description Project File Line Suppression State</p><p>Error CS0246 The type or namespace name 'RoomUser' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 1 Active</p><p>Error CS0116 A namespace cannot directly contain members such as fields or methods Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 1 Active</p><p>Error CS0246 The type or namespace name 'ChatCommand' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\PlayCommand.cs 3 Active</p><p>Error CS0234 The type or namespace name 'Football' does not exist in the namespace 'Slopt.HabboHotel.Rooms.Games' (are you missing an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 36 Active</p><p>Error CS0246 The type or namespace name 'Soccer' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 72 Active</p><p>Error CS0246 The type or namespace name 'Soccer' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 411 Active</p><p>Error CS0246 The type or namespace name 'Item' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 6 Active</p><p>Error CS1061 '<invalid-global-code>' does not contain a definition for '_balls' and no accessible extension method '_balls' accepting a first argument of type '<invalid-global-code>' could be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 6 Active</p><p>Error CS1061 '<invalid-global-code>' does not contain a definition for '_room' and no accessible extension method '_room' accepting a first argument of type '<invalid-global-code>' could be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 87 Active</p><p>Error CS0103 The name 'VerifyBall' does not exist in the current context Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 131 Active</p><p>Error CS0103 The name 'MoveBall' does not exist in the current context Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 142 Active</p><p>Warning CS0105 The using directive for 'Slopt.HabboHotel.GameClients' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 11 Active</p><p>Warning CS0105 The using directive for 'Slopt.HabboHotel.Rooms.Chat.Commands.Moderator' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 15 Active</p><p>Warning CS0105 The using directive for 'Slopt.HabboHotel.GameClients' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 26 Active</p><p>Warning CS0105 The using directive for 'Slopt.Communication.Packets.Outgoing.Rooms.Notifications' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 28 Active</p><p>Warning CS0108 'Room.HideWired' hides inherited member 'RoomData.HideWired'. Use the new keyword if hiding was intended. Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 381 Active[/CODE]</p><p>Here is the Soccer.cs:</p><p>[CODE]</p><p>public void OnUserWalk(RoomUser User)</p><p>{</p><p> if (User == null)</p><p> return;</p><p></p><p> foreach (Item item in this._balls.Values.ToList())</p><p> {</p><p> int NewX = 0;</p><p> int NewY = 0;</p><p> int differenceX = User.X - item.GetX;</p><p> int differenceY = User.Y - item.GetY;</p><p></p><p> if (differenceX == 0 && differenceY == 0)</p><p> {</p><p> if (User.RotBody == 4)</p><p> {</p><p> NewX = User.X;</p><p> NewY = User.Y + 4;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p></p><p> }</p><p> else if (User.RotBody == 6)</p><p> {</p><p> NewX = User.X - 4;</p><p> NewY = User.Y;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p></p><p> }</p><p> else if (User.RotBody == 0)</p><p> {</p><p> NewX = User.X;</p><p> NewY = User.Y - 4;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p></p><p> }</p><p> else if (User.RotBody == 2)</p><p> {</p><p> NewX = User.X + 4;</p><p> NewY = User.Y;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p></p><p> }</p><p> else if (User.RotBody == 1)</p><p> {</p><p> NewX = User.X + 4;</p><p> NewY = User.Y - 4;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p></p><p> }</p><p> else if (User.RotBody == 7)</p><p> {</p><p> NewX = User.X - 4;</p><p> NewY = User.Y - 4;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p></p><p> }</p><p> else if (User.RotBody == 3)</p><p> {</p><p> NewX = User.X + 4;</p><p> NewY = User.Y + 4;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p></p><p> }</p><p> else if (User.RotBody == 5)</p><p> {</p><p> NewX = User.X - 4;</p><p> NewY = User.Y + 4;</p><p> item.ExtraData = "55";</p><p> item.BallIsMoving = true;</p><p> item.BallValue = 1;</p><p> }</p><p></p><p> if (!this._room.GetRoomItemHandler().CheckPosItem(User.GetClient(), item, NewX, NewY, item.Rotation, false, false))</p><p> {</p><p> if (User.RotBody == 0)</p><p> {</p><p> NewX = User.X;</p><p> NewY = User.Y + 1;</p><p> }</p><p> else if (User.RotBody == 2)</p><p> {</p><p> NewX = User.X - 1;</p><p> NewY = User.Y;</p><p> }</p><p> else if (User.RotBody == 4)</p><p> {</p><p> NewX = User.X;</p><p> NewY = User.Y - 1;</p><p> }</p><p> else if (User.RotBody == 6)</p><p> {</p><p> NewX = User.X + 1;</p><p> NewY = User.Y;</p><p> }</p><p> else if (User.RotBody == 5)</p><p> {</p><p> NewX = User.X + 1;</p><p> NewY = User.Y - 1;</p><p> }</p><p> else if (User.RotBody == 3)</p><p> {</p><p> NewX = User.X - 1;</p><p> NewY = User.Y - 1;</p><p> }</p><p> else if (User.RotBody == 7)</p><p> {</p><p> NewX = User.X + 1;</p><p> NewY = User.Y + 1;</p><p> }</p><p> else if (User.RotBody == 1)</p><p> {</p><p> NewX = User.X - 1;</p><p> NewY = User.Y + 1;</p><p> }</p><p> }</p><p> }</p><p> else if (differenceX <= 1 && differenceX >= -1 && differenceY <= -1 && differenceY >= 1 && VerifyBall(User, item.Coordinate.X, item.Coordinate.Y))//VERYFIC BALL CHECAR SI ESTA EN DIRECCION ASIA LA PELOTA</p><p> {</p><p> NewX = differenceX * -1;</p><p> NewY = differenceY * -1;</p><p></p><p> NewX = NewX + item.GetX;</p><p> NewY = NewY + item.GetY;</p><p> }</p><p></p><p> if (item.GetRoom().GetGameMap().ValidTile(NewX, NewY))</p><p> {</p><p> MoveBall(item, User.GetClient(), NewX, NewY);</p><p> }</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="dimitrisbey, post: 460140, member: 92493"] Hi guys, when I do rebuild my emulator it gives these errors: [CODE]Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'RoomUser' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 1 Active Error CS0116 A namespace cannot directly contain members such as fields or methods Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 1 Active Error CS0246 The type or namespace name 'ChatCommand' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\PlayCommand.cs 3 Active Error CS0234 The type or namespace name 'Football' does not exist in the namespace 'Slopt.HabboHotel.Rooms.Games' (are you missing an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 36 Active Error CS0246 The type or namespace name 'Soccer' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 72 Active Error CS0246 The type or namespace name 'Soccer' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 411 Active Error CS0246 The type or namespace name 'Item' could not be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 6 Active Error CS1061 '<invalid-global-code>' does not contain a definition for '_balls' and no accessible extension method '_balls' accepting a first argument of type '<invalid-global-code>' could be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 6 Active Error CS1061 '<invalid-global-code>' does not contain a definition for '_room' and no accessible extension method '_room' accepting a first argument of type '<invalid-global-code>' could be found (are you missing a using directive or an assembly reference?) Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 87 Active Error CS0103 The name 'VerifyBall' does not exist in the current context Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 131 Active Error CS0103 The name 'MoveBall' does not exist in the current context Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Games\Football\Soccer.cs 142 Active Warning CS0105 The using directive for 'Slopt.HabboHotel.GameClients' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 11 Active Warning CS0105 The using directive for 'Slopt.HabboHotel.Rooms.Chat.Commands.Moderator' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 15 Active Warning CS0105 The using directive for 'Slopt.HabboHotel.GameClients' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 26 Active Warning CS0105 The using directive for 'Slopt.Communication.Packets.Outgoing.Rooms.Notifications' appeared previously in this namespace Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Chat\Commands\Moderator\GiveSpecialReward.cs 28 Active Warning CS0108 'Room.HideWired' hides inherited member 'RoomData.HideWired'. Use the new keyword if hiding was intended. Slopt C:\xampp\htdocs\ielsa slopt fix emu - Copy\ielsa slopt fix emu\HabboHotel\Rooms\Room.cs 381 Active[/CODE] Here is the Soccer.cs: [CODE] public void OnUserWalk(RoomUser User) { if (User == null) return; foreach (Item item in this._balls.Values.ToList()) { int NewX = 0; int NewY = 0; int differenceX = User.X - item.GetX; int differenceY = User.Y - item.GetY; if (differenceX == 0 && differenceY == 0) { if (User.RotBody == 4) { NewX = User.X; NewY = User.Y + 4; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } else if (User.RotBody == 6) { NewX = User.X - 4; NewY = User.Y; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } else if (User.RotBody == 0) { NewX = User.X; NewY = User.Y - 4; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } else if (User.RotBody == 2) { NewX = User.X + 4; NewY = User.Y; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } else if (User.RotBody == 1) { NewX = User.X + 4; NewY = User.Y - 4; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } else if (User.RotBody == 7) { NewX = User.X - 4; NewY = User.Y - 4; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } else if (User.RotBody == 3) { NewX = User.X + 4; NewY = User.Y + 4; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } else if (User.RotBody == 5) { NewX = User.X - 4; NewY = User.Y + 4; item.ExtraData = "55"; item.BallIsMoving = true; item.BallValue = 1; } if (!this._room.GetRoomItemHandler().CheckPosItem(User.GetClient(), item, NewX, NewY, item.Rotation, false, false)) { if (User.RotBody == 0) { NewX = User.X; NewY = User.Y + 1; } else if (User.RotBody == 2) { NewX = User.X - 1; NewY = User.Y; } else if (User.RotBody == 4) { NewX = User.X; NewY = User.Y - 1; } else if (User.RotBody == 6) { NewX = User.X + 1; NewY = User.Y; } else if (User.RotBody == 5) { NewX = User.X + 1; NewY = User.Y - 1; } else if (User.RotBody == 3) { NewX = User.X - 1; NewY = User.Y - 1; } else if (User.RotBody == 7) { NewX = User.X + 1; NewY = User.Y + 1; } else if (User.RotBody == 1) { NewX = User.X - 1; NewY = User.Y + 1; } } } else if (differenceX <= 1 && differenceX >= -1 && differenceY <= -1 && differenceY >= 1 && VerifyBall(User, item.Coordinate.X, item.Coordinate.Y))//VERYFIC BALL CHECAR SI ESTA EN DIRECCION ASIA LA PELOTA { NewX = differenceX * -1; NewY = differenceY * -1; NewX = NewX + item.GetX; NewY = NewY + item.GetY; } if (item.GetRoom().GetGameMap().ValidTile(NewX, NewY)) { MoveBall(item, User.GetClient(), NewX, NewY); } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Slopt Emulator Soccer.cs Error
Top