August 1st, 2003, 09:05 PM
Monopoly - does this work for you.
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
August 1st, 2003, 11:39 PM
Well I get that same error.
1 ? Must be a typo or something.
1=Label(c2, text='CHANCE\nAdvance to Pall Mall.\nIf you pass GO, collect $200',font=('Lucida Handwriting', 10)).pack(padx=10, pady=10)
Time is the greatest of teachers ; sadly, it kills all of its students.
- Hector Berlioz
August 1st, 2003, 11:41 PM
Sorry, forget last post. I thought the 'l' was a '1'. *sigh* It's getting late 'round here.
August 2nd, 2003, 06:23 AM
Hey Bear, what version are you using by the way?
August 2nd, 2003, 06:30 AM
Uhh.. the 'l' was a 1. I changed it to an 'l' and it worked fine (2.3).
August 2nd, 2003, 06:45 AM
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'
August 2nd, 2003, 11:31 AM
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.
August 2nd, 2003, 12:34 PM
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!