#1
  1. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69

    Monopoly - does this work for you.


    Hi all,

    I was given this script to look at, now i've just ugraded to 2.3 and the guy who gave it to me said it works fine with his version. Anyway i was wondering if this is a problem with 2.3 or something else. i'm getting

    Cant assign to literal (monopoly.py, line 197) in idle

    Thanks for any insite guys, Hope this isn't an error in 2.3

    Have fun,
    Mark.
    Attached Files
  2. #2
  3. onCsdfeu
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Canada
    Posts
    100
    Rep Power
    11
    Well I get that same error.
    Code:
        1=Label(c2, text='CHANCE\nAdvance to Pall Mall.\nIf you pass GO, collect $200',font=('Lucida Handwriting', 10)).pack(padx=10, pady=10)
    1 ? Must be a typo or something.
    Time is the greatest of teachers ; sadly, it kills all of its students.
    - Hector Berlioz
  4. #3
  5. onCsdfeu
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Canada
    Posts
    100
    Rep Power
    11
    Sorry, forget last post. I thought the 'l' was a '1'. *sigh* It's getting late 'round here.
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Hey Bear, what version are you using by the way?

    Mark.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Norwich, UK
    Posts
    53
    Rep Power
    12
    Uhh.. the 'l' was a 1. I changed it to an 'l' and it worked fine (2.3).
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Thanks guys,

    I just did the same thing like 5 min ago. I surpose it's an easy mistake to make, the '1' does kinda look like an 'l'. The question being, why would this work on 2.2? It uses the same rules when it comes to literals..

    And the next puzzeling thing when this program is run the window closes strait away unless i open it with idle, anyone else get this?

    I got the same thing with another program from the same class.. strange apples a'

    Thanks again,
    Mark.
  12. #7
  13. onCsdfeu
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Canada
    Posts
    100
    Rep Power
    11
    Version : 2.3

    Well you're right netytan, it only works when I start it using IDLE ! I have no clue as to why this won't work with a simple double-click, though.
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I know, it's very wierd! No idea either, I tested it with 2.2 and it does exactly the same thing. So since it's not mine, and i don't have the time (or interest) to wade through it and figure it out i'll just accept it.. at least it's not a error in Python 2.3!

    Thanks for your input!
    Mark.

IMN logo majestic logo threadwatch logo seochat tools logo