Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Notepad++ and libtcod  (Read 1270 times)

chaoticag

  • Bay Watcher
  • All Natural Pengbean
    • View Profile
Notepad++ and libtcod
« on: March 13, 2011, 04:48:07 am »

I'm trying to follow this Rogue Basin tutorial on libtcod, and I keep getting the error that's described and fixed here:

So, here's my problem, I know that fixes the problem, but I have no idea what it's trying to tell me, most of this goes over my head. I understand those are meant to be batch files, but I really have no idea how to set those up, and, well, anything to do with batch files. I'd really rather have nothing to do with batch files, so don't expect me to google it, I just want to know if I have to stick those commands in a file and... well, do something with it.
Logged

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Notepad++ and libtcod
« Reply #1 on: March 13, 2011, 11:10:04 am »

If I understand correctly, make a batch file called debug_py.bat and paste this into it:
Code: [Select]
@echo off

cd %1
%2

if not errorlevel 1 goto quit
echo.
echo.
pause
:quit
Now run the new batch file with
C:> "C:\path\to\debug_py.bat" "C:\path\to\python\files\directory" "python_file.py"
e.g.
"C:\Documents and Settings\debug_py.bat" "C:\Documents and Settings\games\" "game.py"

Alternatively, you can replace %1 and %2 in the script with "C:\Documents and Settings\games\" and "game.py" respectively and run the batch file from explorer.
« Last Edit: March 13, 2011, 11:16:58 am by ILikePie »
Logged

Norskov

  • Escaped Lunatic
    • View Profile
Re: Notepad++ and libtcod
« Reply #2 on: March 13, 2011, 12:37:43 pm »

In Notepad++ press F5 and type in

"C:\whatever\debug_py.bat" "$(CURRENT_DIRECTORY)" $(FILE_NAME)

Where C:\whatever is the directory your batch file is located. You can now press save and map it to a shortcut. Now when you press the shortcut with your code open it will run the batch file with that code.
Logged

chaoticag

  • Bay Watcher
  • All Natural Pengbean
    • View Profile
Re: Notepad++ and libtcod
« Reply #3 on: March 13, 2011, 03:45:39 pm »

Did that, still getting an error.
Logged