"Siege supply" not defined?? The last "]" in module_items.py is syntax error??

Users who are viewing this thread

I'm not sure how it started, but it all worked correctly, and I was giving firearms particle systems and then it had something like this come up:
x2kwic.jpg

saying that the LAST "[" in module_items.py is invalid syntax..


This is basically what is in the last few lines:
Code:
["heavy_arquebuse", "Heavy Arquebuse", [("heavy_crossbow",0)], itp_type_musket |itp_merchandise|itp_primary|itp_two_handed|itp_cant_use_on_horseback ,itcf_shoot_pistol|itcf_reload_pistol|itcf_carry_crossbow_back, 683 , weight(3.75)|difficulty(20)|spd_rtng(30) | shoot_speed(222) | thrust_damage(73 ,pierce)|max_ammo(1)|accuracy(85),imodbits_crossbow, [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],


[color=red]][/color]

After that I'm not sure what I did but this ended up happening:
2r7v5e0.jpg



I checked and double checked that "siege_supply" IS in the file but it just keeps saying that it's not defined.
I even moved all the new items to a new "module_item.py" file, and it's still the same.


Any ideas on how to solve this??
 
I could be wrong, but in that second screenshot there's the little arrow pointing to the ] bracket. I'm guessing you are missing a comma after that bracket. Missing or extra commas and brackets are usually the cause of syntax errors. In my experience (which isn't very much....) anyway.
 
You're almost certainly either missing a comma, bracket, or paranthesis, have one misplaced, or need to remove one. I'm not sure where without seeing more of the code than that, but you should be able to find it with a little diligence :smile:
 
I checked it in Notepad++. Just get rid of the last bracket before the comma in the last line:

Code:
"psys_pistol_smoke", pos1, 15)])]],
To this
Code:
"psys_pistol_smoke", pos1, 15)])],
 
ooh thanks..
(I think I put the screenshots in the wrong order...)

It doesn't seem to be the "])]]," part that caused the problem. I moved all the items to a brand new module system and it all worked. I did move some thing around and it went back to the problem, but I just undid a bunch of changes and it's fine again..
I probably misplaced something at some point.
 
Back
Top Bottom