Python errors on a fresh start

Users who are viewing this thread

Hey, I am back into the modding business with warband, and just set it up.
Fresh WB install, copied native, set up the variable path for python, the usual.

Yet when I test the module system, i get this:
Code:
Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
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 info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3_troop
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3_troop
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: g_presentation_lines_to_display_begin
WARNING: Global variable never used: g_presentation_lines_to_display_end
WARNING: Global variable never used: tutorial_1_finished
WARNING: Global variable never used: tutorial_2_finished
WARNING: Global variable never used: tutorial_3_finished
WARNING: Global variable never used: tutorial_4_finished
WARNING: Global variable never used: tutorial_5_finished
WARNING: Global variable never used: g_election_date
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3_troop
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3_troop
Exporting postfx_params...

______________________________

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

These errors are usually easy to fix, but considering it's a completely fresh start with no changes to it whatsoever, I suspect there's something else afoot.
 

Ruthven

Baron
WBM&BVC
Which MS version are you using?

Anyways, they're just warnings, so chances are it won't affect your game, but if they really bug you you could just make a script that assigns all those global variables to something and just never call the script.
 
Ruthven said:
Which MS version are you using?

Anyways, they're just warnings, so chances are it won't affect your game, but if they really bug you you could just make a script that assigns all those global variables to something and just never call the script.
Latest version.

I know, but I have yet to modify the files, should they be there in the first place?
 

Ruthven

Baron
WBM&BVC
Graylord said:
Ruthven said:
Which MS version are you using?

Anyways, they're just warnings, so chances are it won't affect your game, but if they really bug you you could just make a script that assigns all those global variables to something and just never call the script.
Latest version.

I know, but I have yet to modify the files, should they be there in the first place?
In 1.113 there are a few warnings yeah. I only get three, but myeh. Shouldn't affect anything.
 
Coincidentally, If you run it again, it doesn't actually go away. An I would rather find the problem than it just not tell me.

Secondly, as for the unused variables, I found that I had to go through the coding and find the source:

The "WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection_max_renown_3" is from the game menus, and is the fact that the variable "$g_presentation_marshall_selection_max_renown_3" hasn't been created yet, so find it and just add the lines
Code:
(assign, "$g_presentation_marshall_selection_max_renown_3", 0),
(assign, "$g_presentation_marshall_selection_max_renown_3_troop", 0),
The rest just go through and search for them.
 

ordoboy27

Veteran
This was very helpful eagles_rule_der. I had this error and I added your code. It took away the errors. If anyone is wondering where I placed the code, was in module_game_menus (like what eagles said). I used notepad ++ which is helpful because it tells which line I was on. I added the two lines of code after line 11370. And line 11370 in the Native module is:
(eq, "$g_presentation_marshall_selection_max_renown_2_troop", "trp_player") ,
So if something is different with your module just select search in the notepad ++ toolbar and type in that line to find it's location. I'm pretty noobish at this stuff so I had to do a lot of trial and error; just hoped that this helps any fellow noobs ^^
 
Wait , so you search for the lines
Code:
(assign, "$g_presentation_marshall_selection_max_renown_3", 0),
and
Code:
(assign, "$g_presentation_marshall_selection_max_renown_3_troop", 0),
and then add what? I found them in my code and am not sure what to add. If it hasn't been created, why can I find them? Can someone post a complete step by step please?
 

-zorph-

Recruit
I also got the ones about presentation_marshall_selection_max_renown_3, but after doing what eagles_rule_der said I got rid of those WARNING: messages.

Now I still get these and can't find them in the 'module_dialogs.py' file.

Code:
Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
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 info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: tutorial_1_finished
WARNING: Global variable never used: tutorial_2_finished
WARNING: Global variable never used: tutorial_3_finished
WARNING: Global variable never used: tutorial_4_finished
WARNING: Global variable never used: tutorial_5_finished
WARNING: Global variable never used: g_election_date
WARNING: Global variable never used: g_presentation_lines_to_display_begin
WARNING: Global variable never used: g_presentation_lines_to_display_end
Exporting postfx_params...

______________________________

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

I am assuming that these entries aren't in the module_dialogs.py ("Never used"), but where do they go? I tried searching for their source but couldn't find it. Can somebody please help?
 
-zorph- said:
I am assuming that these entries aren't in the module_dialogs.py ("Never used"), but where do they go? I tried searching for their source but couldn't find it. Can somebody please help?
Download some of text editors allowing text search in all files in a folder, and search through module system. Something like Notepad++. This functionality is indispensable when working with module system
 

SPD_Phoenix

Master Knight
I copied the variables.txt file from the Native folder and put it in my module folder where all of the *.py files are and that fixed the problem (in both 1.113 and 1.125). Need to be the same version. Don't know if that would work for anyone else.
 

-zorph-

Recruit
-zorph- said:
I also got the ones about presentation_marshall_selection_max_renown_3, but after doing what eagles_rule_der said I got rid of those WARNING: messages.

Now I still get these and can't find them in the 'module_dialogs.py' file.

Code:
Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
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 info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: tutorial_1_finished
WARNING: Global variable never used: tutorial_2_finished
WARNING: Global variable never used: tutorial_3_finished
WARNING: Global variable never used: tutorial_4_finished
WARNING: Global variable never used: tutorial_5_finished
WARNING: Global variable never used: g_election_date
WARNING: Global variable never used: g_presentation_lines_to_display_begin
WARNING: Global variable never used: g_presentation_lines_to_display_end
Exporting postfx_params...

______________________________

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

I am assuming that these entries aren't in the module_dialogs.py ("Never used"), but where do they go? I tried searching for their source but couldn't find it. Can somebody please help?

I still need help on this, these are the only errors I am getting. Can somebody let me know what needs to be done?
 

artifex

Knight
WB
None of those errors are major. The variables.txt just needs to be re-written each time, the un-used items are just unassigned, and as Egbert said, there are some things that haven't been finished in the module.
 

Egbert

Master Knight
M&BWB
Yes.
[quote author=Daegoth]
they are there for keeping the savegame compatibility.
[/quote]
 

James380

Sergeant
SPD_Phoenix said:
I copied the variables.txt file from the Native folder and put it in my module folder where all of the *.py files are and that fixed the problem (in both 1.113 and 1.125). Need to be the same version. Don't know if that would work for anyone else.

Youre right...it did fix all the errors.
when building the mod does python also read the .txt files?
i did know that lol.
 

Kingpercival

Recruit
(assign, "$g_presentation_marshall_selection_max_renown_3", 0),
(assign, "$g_presentation_marshall_selection_max_renown_3_troop", 0),

Excelent job guys thank you very much I added these lines at 11370 line as you said and error went away, you are genius :smile:.

Now lets learn how to code lol.

What a noob :sad:
 
Top Bottom