bad error

03/24/2013 19:35 anawbas#1
PHP Code:
               for (byte b2 = 0; b2 < 13; b2 += 1)
                {
                    
PokerCard pokerCard = new PokerCard();
                   
pokerCard.Id = b2 + 13 * b;
                    
pokerCard.Typ = typ;
                    
pokerCard.Val = b2;
                    
this.Cards.Add(pokerCard.Id, pokerCard);
                }
            } 

PHP Code:
        public uint GetNextSeat(byte Seat, bool Next)
        {
            
uint result;
            try
            {
                
System.Collections.Generic.Dictionary<byte, PokerPlayer> seats = this.Seats;
                
byte b = Seat + 1;
                
bool flag = false;
                while (!
flag)
                {
                    if (
seats.ContainsKey(b))
                    {
                        if (
seats[b].RoundState != 4 && seats[b].Connected)
                        {
                            break;
                        }
                    }
                    
b += 1;
                    if (
b > 9)
                    {
                        
b = 0;
                    }
                }
                
uint playerId = seats[b].PlayerId;
                if (
playerId == this._StartingPlayer && Next)
                {
                    
this.RoundStage += 1;
                }
                
result = playerId;
            }
            catch (
System.Exception ex)
            {
                
PhoenixProject.Console.WriteLine(ex.ToString());
                
result = 0u;
            }
            return 
result;
        } 
error here
Quote:
pokerCard.Id = b2 + 13 * b;
and
Quote:
byte b = Seat + 1;
the error is


PHP Code:
Error    1    Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) 
any help i try to understand
03/24/2013 21:00 EOS 60D#2
The error code is the answer.
Quote:
Cannot implicitly convert type 'int' to 'byte'.
03/24/2013 21:17 abdoumatrix#3
byte b = (byte)Seat + 1;
03/24/2013 21:34 anawbas#4
Quote:
Originally Posted by EOS 60D View Post
The error code is the answer.
i know that but where is the code which have int to cahnge into any const aviable for convert

Quote:
Originally Posted by abdoumatrix View Post
byte b = (byte)Seat + 1;
i will try

big failure