Game menus error

Users who are viewing this thread

Kolba

Hello,

I just made following menu:

 
(
    "thief_introduction",0,
    "I think it shouldn't be difficult to rob Saredhrim. There is only one guard on the near street. I wonder why he didn't hire more guards. He is a wealthy merchant, so he have a lot of goods and gold.\
Well, let's go and show him, who is the master of thievery! Emil, testuj moda!",
    "none",
    [],
    [
        ("rob_saredhrim", [], "Continue...",
       
       

            [         
          (modify_visitors_at_site,"scn_saredhrim_backyard"),(reset_visitors,0),
          (set_visitor,1,"trp_town_guard",1),
          (modify_visitors_at_site,"scn_saredhrim_house"),(reset_visitors,0),
          (set_visitor,1,"trp_town_guard",1),
          (set_jump_mission,"mt_assasination_1"),
          (jump_to_scene,"scn_saredhrim_backyard"),(change_screen_mission)],
          [
          ("saredhrim_house",[],"_",[(set_jump_mission,"mt_town_default"),(jump_to_scene,"scn_saredhrim_house"),(change_screen_mission)],"Door to the house"),
          ]
           
             
    ),
    ]
  ),

Compiled it and got error:

Traceback (most recent call last):
  File "process_game_menus.py", line 47, in <module>
    save_game_menus(variables,variable_uses,tag_uses,qui
  File "process_game_menus.py", line 31, in save_game_me
    save_game_menu_item(ofile,variable_list,variable_use
ck_strings)
  File "process_game_menus.py", line 18, in save_game_me
    ofile.write(" %s "%(string.replace(door_name," ","_"
  File "C:\Python25\lib\string.py", line 517, in replace
    return s.replace(old, new, maxsplit)
AttributeError: 'list' object has no attribute 'replace'

I think that line (...)("saredhrim_house",[](...) is causing problem. Anyone know what's wrong?
 
looks ok to me....  I don't think its required but does it help if you add a comma ?

("saredhrim_house",[],"_",[(set_jump_mission,"mt_town_default"),(jump_to_scene,"scn_saredhrim_house"),(change_screen_mission),],"Door to the house"),
 
Nevermind, Tul helped me fixing it. Here is the correct version:

(
    "thief_introduction",0,
    "I think it shouldn't be difficult to rob Saredhrim. There is only one guard on the near street. I wonder why he didn't hire more guards. He is a wealthy merchant, so he have a lot of goods and gold.\
Well, let's go and show him, who is the master of thievery! Emil, testuj moda!",
    "none",
    [],
    [
    ("rob_saredhrim", [], "Continue...",
[         
  (modify_visitors_at_site,"scn_saredhrim_backyard"),(reset_visitors,0),
  (set_visitors,1,"trp_town_guard",1),
  (modify_visitors_at_site,"scn_saredhrim_backyard"),(reset_visitors,0),
  (set_visitors,1,"trp_town_guard",1),
  (set_jump_mission,"mt_assasination_1"),
  (jump_to_scene,"scn_saredhrim_backyard"),(change_screen_mission),
]
),
("saredhrim_house",[],"Door to the house",
  [
  (set_jump_mission,"mt_town_default"),
  (jump_to_scene,"scn_saredhrim_backyard"),
  (change_screen_mission)
  ]),
    ]
  ),

Thank you all for help!

Regards,
Kolba
 
                What do you think is the possible solution of this problem. I think it needs to update.


<snip>
 
Jonesky said:
                What do you think is the possible solution of this problem. I think it needs to update.

Hello, bot. I think my penis needs enlargement. What possible solutions can you offer?
 
How did he get pb'ed after one post?
EDIT:  Sonofa'  He actually was a bot. It didn't take the admins long to get "it".
 
Back
Top Bottom