Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable 'p' not defined in cops_chase #3

Closed
aconamos opened this issue Oct 10, 2020 · 1 comment
Closed

Variable 'p' not defined in cops_chase #3

aconamos opened this issue Oct 10, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@aconamos
Copy link
Contributor

events.py
Lines: 25, 39
Variable 'p' is not defined in cops_chase
Variable 'player' is passed in, p should be replaced with player

Traceback
Traceback (most recent call last):
File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "c:\program files\python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Program Files\Python38\Scripts\drugwars.exe_main
.py", line 7, in
File "c:\program files\python38\lib\site-packages\drugwars_main
.py", line 39, in main
main_screen(p)
File "c:\program files\python38\lib\site-packages\drugwars\events.py", line 597, in main_screen
main_screen(p)
File "c:\program files\python38\lib\site-packages\drugwars\events.py", line 597, in main_screen
main_screen(p)
File "c:\program files\python38\lib\site-packages\drugwars\events.py", line 597, in main_screen
main_screen(p)
[Previous line repeated 6 more times]
File "c:\program files\python38\lib\site-packages\drugwars\events.py", line 549, in main_screen
achoice(p)
File "c:\program files\python38\lib\site-packages\drugwars\events.py", line 548, in
achoice = choice([lambda p: cops_chase(p), lambda p: buy_gun(p), lambda p: get_mugged(p), lambda p: find_drugs(p)])
File "c:\program files\python38\lib\site-packages\drugwars\events.py", line 79, in cops_chase
pdrug = p.get_amt(drug)
NameError: name 'p' is not defined

@aconamos aconamos added the bug Something isn't working label Oct 10, 2020
@M4cs
Copy link
Owner

M4cs commented Oct 10, 2020

I literally just ran into this as you made the Issue thread. LOL. Will fix now

@M4cs M4cs closed this as completed in 74861ed Oct 10, 2020
M4cs pushed a commit that referenced this issue Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants