Chaosforge Forum

  • March 28, 2024, 07:34
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Assistance with Python - for Wiki  (Read 4693 times)

Aki

  • Marketing/PR and Wiki Ops
  • Elder
  • Major General
  • *
  • *
  • Offline Offline
  • Posts: 969
    • View Profile
Assistance with Python - for Wiki
« on: October 22, 2013, 03:26 »

So i'm trying to map some of the newer special levels for the wiki and update the older ones.

I'm using the script found here and followed the instructions to the dot.

This is the input that i'm using:

Code: [Select]
map

##############################################################################
####################......................................####################
#############.............=======...................................##########
###########............h.....======.....................h...............######
###...###.......................=====......................................###
##"...##.....g....g...............====......................................##
#.....##...................g..........h.......====#B242424B#====.....h.......#
#.....##.g....................................====#&&##&&&##====.............#
#.....##.......g..................................+....,,^.+.................#
#.>...##...............V......................====#@.,...,,#====..........h..#
#.....##...g.........g.............h..........====#.,,,\,,.#====.............#
#.....##..........................................+...,,.^.+.................#
#.....##g.......g..........g..................====#&&##&&&##====.....h.......#
#.....##...............................h......====.B242424B#====h............#
##"...##..........................====......................................##
###...###.......................=====.....................................####
###########.............h....======....................h...............#######
#############.............=======.................................############
####################......................................####################
##############################################################################

end map

. : floor
, : blood
& : blooded wall
# : stone wall
= : lava
" : agility mod pack
\ : chainsaw
^ : berserk pack
V : arena master
g : former captain
h : former human
B : baron of hell
2 : shotgun shell
4 : power cell

I keep getting this error:



I have NO idea when it comes to these things, I tried fiddling around a little bit and got nowhere. Can anyone help?
Logged
[0.9.9.7]
Rank: Arch-Vile Lt. General
Badges: [22/17/15/10/4/0]

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Assistance with Python - for Wiki
« Reply #1 on: October 22, 2013, 09:12 »

Use Python 2.7.x instead of Python 3.
Logged
I computed, therefore I was.

Aki

  • Marketing/PR and Wiki Ops
  • Elder
  • Major General
  • *
  • *
  • Offline Offline
  • Posts: 969
    • View Profile
Re: Assistance with Python - for Wiki
« Reply #2 on: October 22, 2013, 19:24 »

Thanks for your help.

I received this error after Installing Python 2.7.5 and trying it:



So I uninstalled Python 3.3.2 and tried again:



I have no idea what's going on here @_@
Logged
[0.9.9.7]
Rank: Arch-Vile Lt. General
Badges: [22/17/15/10/4/0]

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Assistance with Python - for Wiki
« Reply #3 on: October 22, 2013, 21:01 »

Because you added a space on the end of each line of the map representation.  You should not do that.

You should also run the command as:

C:\Python27\Script>C:\python27\python.exe map.py "cc+1.txt" "cc+1color.txt"
If I remember correctly, '+' is significant on Windows and so you need to escape it.

I tried that out, works like a charm.  Here's the outcome... NOT!  You have to get it to work yourself because I'm not going to be running this all the time for you in the future.
« Last Edit: October 22, 2013, 21:04 by thelaptop »
Logged
I computed, therefore I was.

Aki

  • Marketing/PR and Wiki Ops
  • Elder
  • Major General
  • *
  • *
  • Offline Offline
  • Posts: 969
    • View Profile
Re: Assistance with Python - for Wiki
« Reply #4 on: October 22, 2013, 21:12 »

Tried that, and it still came up with the same error:



As for running it myself, i've been fiddling around with it without much success, but neither you nor anyone else are obligated to help, though your help's been much appreciated :>
Logged
[0.9.9.7]
Rank: Arch-Vile Lt. General
Badges: [22/17/15/10/4/0]

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Assistance with Python - for Wiki
« Reply #5 on: October 22, 2013, 21:19 »

I call shenanigans.

sys.argv[1] will give you a list index out of range when you didn't pass the script any command line arguments.  There's no other way in which it will throw up that message.

Check your command line again!
Logged
I computed, therefore I was.

MaiZure

  • Marketing/PR Ops Lead
  • Greater Elder
  • Major General
  • *
  • *
  • Offline Offline
  • Posts: 827
  • Retired 1-Star General (.993)
    • View Profile
    • Project repository
Re: Assistance with Python - for Wiki
« Reply #6 on: October 22, 2013, 23:32 »

This could REALLY be more effective on IRC...
Logged
Hell Knight 1st Lt. (.997)
[22/13/9/2/0]

Aki

  • Marketing/PR and Wiki Ops
  • Elder
  • Major General
  • *
  • *
  • Offline Offline
  • Posts: 969
    • View Profile
Re: Assistance with Python - for Wiki
« Reply #7 on: October 23, 2013, 00:53 »

Managed to get it to work, so closing. Thanks everyone!
Logged
[0.9.9.7]
Rank: Arch-Vile Lt. General
Badges: [22/17/15/10/4/0]
Pages: [1]