Author Topic: Python  (Read 6191 times)

laanan

  • Newcomer
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Python
« on: June 12, 2018, 09:35:09 PM »
Hello folks,

New to the forum here and hunting for help with Python debugging. I've taken a segue off from the libtcod python roguelike tutorial on roguebasin to set-up keyboard based targeting for grenades, etc. (the tutorial uses mouse based).

I've got it to where I can go into a targeting mode (move a cursor around), but I am having major issues getting my functions talking to each other. In short, it appears that function and variable values are not getting into the function for the grenade. I have tried setting variables, return values, etc, going around and around, trying different ideas, and I think I am just getting more and more lost.

One thing that would be very helpful would be a way to see which part of the program is active when it starts having problems. I have tried using print statements to tell me a little bit about what is going on inside, but, when I don't get an error message or a print message, and the program stays stuck, I don't know what to do!

I would like to know what part of the program is active so I can troubleshoot the problem. If anyone has any suggestions, that would be great! Thank you very much!

Best,

Laanan

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Python
« Reply #1 on: September 03, 2018, 08:51:23 AM »
You could show parts of the code that have a problem and also explain what "stays stuck" means. Usually in programming context it means there is a loop that can't exit.