We got a problem over here!

Users who are viewing this thread

bjorne.

Sergeant Knight
Well I manage with help to make myself a script the increases the party size by each day and after a while it becomes another kind of party.

Well Here is the problem. I seam to get this error message everytime. And I can't figure out why.. Please help!

Initializing...
Traceback (most recent call last):
  File "process_global_variables.py", line 7, in <module>
    from module_simple_triggers import *
  File "C:\Users\Ambj÷rn\Documents\Mount&Blade\Modules\crouching-mod\ModuleSyste
m\module_simple_triggers.py", line 2629, in <module>
    (try_end),
TypeError: 'tuple' object is not callable
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
Traceback (most recent call last):
  File "process_simple_triggers.py", line 2, in <module>
    from module_simple_triggers import *
  File "C:\Users\Ambj÷rn\Documents\Mount&Blade\Modules\crouching-mod\ModuleSyste
m\module_simple_triggers.py", line 2629, in <module>
    (try_end),
TypeError: 'tuple' object is not callable
exporting triggers...
exporting dialogs...
Checking global variable usages...

______________________________

Script processing has ended.
Press any key to exit. . .

Here is the script I am using. I can't see the problem.

#########Growing Parties Begin#########
##Give 5 troops to the party every day
  (24,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":limit",":party_no"),
    (lt, ":limit", 200),
    (party_add_members,":party_no","trp_looter",5),
  (try_end),
  ])


##Making them to change their name
  (92,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":size",":party_no"),
    (ge, ":size", 100),
    (party_set_name, "p_looters", "str_reb_mob"),
  (try_end),
  ])

#########Growing Parties End#########
 
Not sure that this is your issue, but isn't your party_set_name messed up?  Shouldn't it be...

(party_set_name, ":party_no", "str_reb_mob"),
 
you don't have commas at the end of your tuples.  That's generally what this error means (or you forgot a bracket, but in this case I can clearly see you are missing commas).
 
HokieBT said:
Not sure that this is your issue, but isn't your party_set_name messed up?  Shouldn't it be...

(party_set_name, ":party_no", "str_reb_mob"),
But in this case it is only the looters who is gaining troops. So should I still have :part_no? Maybe this since I assigned this to the looters. :template..

jik said:
you don't have commas at the end of your tuples.  That's generally what this error means (or you forgot a bracket, but in this case I can clearly see you are missing commas).
So where should the commas be?
 
just like with every tuple... at the end of it to define it's end:

#########Growing Parties Begin#########
##Give 5 troops to the party every day
  (24,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":limit",":party_no"),
    (lt, ":limit", 200),
    (party_add_members,":party_no","trp_looter",5),
  (try_end),
  ]),            ##here and...


##Making them to change their name
  (92,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":size",":party_no"),
    (ge, ":size", 100),
    (party_set_name, "p_looters", "str_reb_mob"),
  (try_end),
  ]),            ##here

#########Growing Parties End#########
 
but I looked at the other simple triggers and they didn't have it so I though. To heck with them. But it seams I was wrong.

EDIT: I added the commas as you said. And I still get this error message

Code:
Initializing...
Traceback (most recent call last):
  File "process_global_variables.py", line 7, in <module>
    from module_simple_triggers import *
  File "C:\Users\Ambj÷rn\Documents\Mount&Blade\Modules\crouching-mod\ModuleSyste
m\module_simple_triggers.py", line 2629, in <module>
    (try_end),
TypeError: 'tuple' object is not callable
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
Traceback (most recent call last):
  File "process_simple_triggers.py", line 2, in <module>
    from module_simple_triggers import *
  File "C:\Users\Ambj÷rn\Documents\Mount&Blade\Modules\crouching-mod\ModuleSyste
m\module_simple_triggers.py", line 2629, in <module>
    (try_end),
TypeError: 'tuple' object is not callable
exporting triggers...
exporting dialogs...
Checking global variable usages...

______________________________

Script processing has ended.
Press any key to exit. . .
 
Check the tuple above those two for a comma at the end.  The last tuple before the final ] in the whole file doesn't have to have one.  Now it isn't the last tuple anymore.
 
Berserker Pride said:
Check the tuple above those two for a comma at the end.  The last tuple before the final ] in the whole file doesn't have to have one.  Now it isn't the last tuple anymore.
Yea that solved it! Thanks guys! Let's check if it actaully works now aswell.

EDIT: The gaining troops worked great. But the change name didn't...
This was the code for that part. Does anyone know the problem?
Code:
  (92,
   [
   (try_for_parties,":party_no"),
     (party_get_template_id, ":template",":party_no"),
     (eq, ":template", "pt_looters"),
     (party_get_num_companions,":size",":party_no"),
     (ge, ":size", 20),
     (party_set_name, ":template", "str_reb_mob"),
   (try_end),
   ])
 
Well if I had to guess(might not work) I might say try renaming the party instead of the template.
(party_set_name, ":party_no", "str_reb_mob"), :template is the name of the template not the party.  I don't know if this will work or not but its just a thought. Is there a template set name call?
 
The code seems ok to me. Maybe you haven't waited long enough for trigger to fire?

Make sure you don't have any language template file overriding that party template name. Look for file "party_templates.csv" in "language" directory of your mod.

If there is no such a file you can add a debug message to the code to find out if it is triggered properly. Something like this:
  (92,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":size",":party_no"),
    (ge, ":size", 20),
    (party_set_name,":party_no", "str_reb_mob"),
#debug
    (str_store_string,s1, "str_reb_mob"),
    (assign,reg1,":party_no"),
    (display_message,"@Party nr {reg1} renamed to {s1}"),
#debug end
  (try_end),
  ]),
 
it would probably work but Kolba solved it for me now...
the green parts did the trick

##Making them to change their name
  (92,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":size",":party_no"),
    (ge, ":size", 20),
    (assign, ":party_name_str", "str_reb_mob"),
    (party_set_name, ":template", ":party_name_str"),
  (try_end),
  ])

but thanks for all your help guys... it's really appreciated
 
Maybe it's just me, but that code you posted CAN'T work properly, since it's the same code you posted at first (there's no need to assign a string to a local variable) and with it you are renaming a whole party TEMPLATE not a specyfic party. So even if it works it would rename ALL looters parties. Am i wrong?
 
Oh.. sry your right.. I ment this one... I was posting the wrong one... that one was the problem one...



##Making them to change their name
  (92,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":size",":party_no"),
    (ge, ":size", 20),
    (assign, ":party_name_str", "str_reb_mob"),
    (party_set_name, ":party_no", ":party_name_str"),  (try_end),
  ])



This is how I ment sry.
 
Back
Top Bottom