Re: Attempting to subscript an atom

new topic     » goto parent     » topic index » view thread      » older message » newer message

David,

It appears to me that the problem starts with the way you have filled in the
variable Deck. It should be a 'sequence of sequences', i.e. 52 elements,
each consisting of a bitmap as the first element and a value as the second.
You can check this by inserting 'print Deck[1]' or '? Deck[1]' after Deck
has been created.
I think Irv and/or David Cuny gave you examples how to fill the sequence
Deck.

Ad

----- Oorspronkelijk bericht -----
Van: David Roach <roachd_76 at YAHOO.COM>
Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Verzonden: maandag 6 december 1999 4:39
Onderwerp: Attempting to subscript an atom


> I am curently woking on a Black Jack game as some of you know. Thanks for
> all who have helped me in my endevor. I have come across a new problem.
> As per the subject line. I am getting an error of "Attempting to subscript
> an atom". :(
> -- code with the problem
> integer pick
>  atom dcard1,dcard2,pcard1,pcard2
>
>  pick = rand(52)
>  dcard1 = Deck[pick]
>  drawBitmap(BlackJack,dcard1,45,45)
>  playhand = playhand + dcard1[2]--trying to subscript an at
> Any ideas on this. My lack of knowlege on computer programing and syntax
> in euphoria is holding me back. What I am trying to do overall is take
> the value for the card that is selected with "pick" and keep up with
> the dealers hand and the players hand in a integers playhand, dealhand.
> It just don't work for me. Thanks for your time.
>
>
> David Roach
> roachd_76 at yahoo.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu