ServUO.com-Texas_Holdem Errors help please.

ParanoiaPhD

Well-Known Member
May 2, 2019
76
10
31
California
www.iceyou.org
Shard Name
Central USA
This is the only poker script that doesn't have something weird required I think these errors look easy to fix I just don't know how and need help... Here are the errors I'm getting...
C#:
Scripts: Compiling C# scripts...Failed with: 2 errors, 0 warnings
Errors:
+ Texas Hold'em/PokerGame.cs:
    CS1061: Line 748: 'PlayerMobile' does not contain a definition for 'PokerGame' and no accessible extension method 'PokerGame' accepting a first argument of type 'PlayerMobile' could be found (are you missing a using directive or an assembly reference?)
    CS1061: Line 823: 'PlayerMobile' does not contain a definition for 'PokerGame' and no accessible extension method 'PokerGame' accepting a first argument of type 'PlayerMobile' could be found (are you missing a using directive or an assembly reference?)
+ Texas Hold'em/PokerDealer.cs:
    CS1061: Line 247: 'PlayerMobile' does not contain a definition for 'PokerGame' and no accessible extension method 'PokerGame' accepting a first argument of type 'PlayerMobile' could be found (are you missing a using directive or an assembly reference?)
    CS1061: Line 277: 'PlayerMobile' does not contain a definition for 'PokerGame' and no accessible extension method 'PokerGame' accepting a first argument of type 'PlayerMobile' could be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Download provided to me by DarkLotus
Post automatically merged:

By the way I'm using ServUO - [https://www.servuo.com] Version 0.5, Build 7066.36892 - Build on 5/7/2019 8:29:44 PM UTC - Debug and I have very little scripting knowledge so help me learn please
 
Last edited:

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,199
189
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
What it means is that DarkLotus had a modified PlayerMobile that included a property called PokerGame. It was probably serialized which is a can of worms unless you know what you are doing. If you don't care about persistence between restarts of a particular game, then all you need is this in PlayerMobile:

C#:
private PokerGame m_PokerGame;
public PokerGame PokerGame {get{return m_PokerGame;} set{m_PokerGame = value;}}
 
  • Like
Reactions: ParanoiaPhD

ParanoiaPhD

Well-Known Member
May 2, 2019
76
10
31
California
www.iceyou.org
Shard Name
Central USA
heck yes... poker is real I will work on this when I wake up unless I cant fix this weird thing happening with my fastfeet first. Thanks for the help guy cant wait to get this working.
 

ParanoiaPhD

Well-Known Member
May 2, 2019
76
10
31
California
www.iceyou.org
Shard Name
Central USA
What it means is that DarkLotus had a modified PlayerMobile that included a property called PokerGame. It was probably serialized which is a can of worms unless you know what you are doing. If you don't care about persistence between restarts of a particular game, then all you need is this in PlayerMobile:

C#:
private PokerGame m_PokerGame;
public PokerGame PokerGame {get{return m_PokerGame;} set{m_PokerGame = value;}}
C#:
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
 + Mobiles/PlayerMobile.cs:
    CS0246: Line 225: The type or namespace name 'PokerGame' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 224: The type or namespace name 'PokerGame' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,199
189
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
C#:
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Mobiles/PlayerMobile.cs:
    CS0246: Line 225: The type or namespace name 'PokerGame' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 224: The type or namespace name 'PokerGame' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
At the top of PlayerMobile, add this:

C#:
using Server.Poker;
 
  • Like
Reactions: ParanoiaPhD

ParanoiaPhD

Well-Known Member
May 2, 2019
76
10
31
California
www.iceyou.org
Shard Name
Central USA
IT WORKS! THANK YOU THIS WILL BE THE FIRST TIME I EVER HAD POKER ON A SERVER

On the first attempt I got this error...
C#:
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
 + Mobiles/PlayerMobile.cs:
    CS0116: Line 55: A namespace cannot directly contain members such as fields or methods
    CS0116: Line 56: A namespace cannot directly contain members such as fields or methods
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
I tried placing it right at the top under name space so then I tried placing the two lines at the very bottom right above the last two "}" characters and it worked. Thanks again
 

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,199
189
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
I tried placing it right at the top under name space so then I tried placing the two lines at the very bottom right above the last two "}" characters and it worked. Thanks again
Not sure where you mean, but it should go at the very top with all the other "using" lines.
 

ParanoiaPhD

Well-Known Member
May 2, 2019
76
10
31
California
www.iceyou.org
Shard Name
Central USA
Not sure where you mean, but it should go at the very top with all the other "using" lines.
I meant the first two lines of code you gave me that I couldnt figure out how to make work... The using Server.Poker; line went at the top yes. But...

went at the very bottom like this...

C#:
        private PokerGame m_PokerGame;
        public PokerGame PokerGame {get{return m_PokerGame;} set{m_PokerGame = value;}}
    }
}
Post automatically merged:

I tried getting poker to work long long ago like 7 years ago... no one would help me. Thanks again
 

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,199
189
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
Just FYI. I was looking through this, and in my opinion this is one script that could seriously use a rewrite. There are sections that are very poorly written.

One example, in JackpotBoard, there is this code at the top of the OnDoubleClick method:

C#:
        public override void OnDoubleClick( Mobile from )
        {
            if ( from.Name == "Weed" )
            {
                PokerDealer.AwardJackpot();
                return;
            }
At first glance, there were users on these forums that thought this was an easter egg put in the system so that the author could name his character "weed" and claim the jackpot, but when you look at the code for "PokerDealer.AwardJackpot()" all it does is force the jackpot to be awarded to whoever was already considered a winner. Not sure why it's even in there. I have a feeling the author originally put it in there for testing so he could award the jackpot before a designated timer had expired. Anyway, that is just one example. It's full of questionable code decisions.

Again, this is just FYI. Use caution and discretion if you run it on a live shard.
 

Milva

Admin
Moderator
Mar 3, 2013
4,169
472
Donate
Donate money to this user
I don't think there ever was one released which never had problems :/