User Info
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 06, 2010, 09:42:47 AM

Login with username, password and session length
Search:     Advanced search
News Box
New M&B Version

1.010 is out, and so is the module system. Get modding!

Key Stats
51711 Posts in 2004 Topics by 4438 Members
Latest Member: Mekelan
Home Help Search Login Register
M&B Mod Community  |  About Modding  |  Discussion (Moderator: Fisheye)  |  Some strange, never-before-seen assertions
Pages: 1 2 3 [4] 5 Print
Author Topic: Some strange, never-before-seen assertions  (Read 5091 times)
fujiwara
Master
*****
Offline Offline

Posts: 859


View Profile Email
« Reply #45 on: December 18, 2007, 09:26:58 AM »

Made the following change, and sure enough, the assertion has gone away:

Code: [Select]
[anyone|plyr,"admin_talk_1",[(check_quest_active,'qst_kokujin_deliver_msg'),
                                 (quest_slot_eq,'qst_kokujin_deliver_msg',slot_quest_target_troop,'$conversation_partner')],
     "I was asked to give a message to you.","admin_msg_reward",[]],
[anyone,"admin_msg_reward",
   [
       (quest_get_slot,reg5,'qst_kokujin_deliver_msg',slot_quest_source_party),
       (quest_get_slot,reg6,'qst_kokujin_deliver_msg',slot_quest_target_party),
       (store_distance_to_party_from_party,':quest_reward',reg5,reg6),
       (val_mul,':quest_reward',10),
       (troop_add_gold,"trp_player",':quest_reward'),
       (add_xp_as_reward,150),
       (call_script,"script_modify_fame",1),
       (call_script,'script_succeed_quest','qst_kokujin_deliver_msg'),
       ####(call_script,'script_end_quest','qst_kokujin_deliver_msg'),####
        ],
    "Ah, arigatou! And here is something for you.","admin_pre_talk",[]],

The problem now is that succeed_quest doens't end the quest. check_quest_active evaluates to true (see the first dialog), causing the dialog option to show up again. Also, the whole script in the conditions block of the second dialog seems to be running twice, since I get duplicate messages of everything on the screen (the gold, xp, and message saying the quest is succeeded). I could get around this by just using complete_quest everywhere, but I'm probably missing out on some functionality doing that, and the new conclude_quest opcode would make my system of quest state flags obsolete (which is fine by me...tracking state $uXorZ), if I could be sure it worked as advertised.
Logged


The horses tend to get their legs caught in the catapult rather than being properly launched.
Fisheye
Blues Brother
Moderator
*****
Offline Offline

Posts: 428


My scalp's so bright, I gotta wear shades.


View Profile Email
« Reply #46 on: December 18, 2007, 02:03:11 PM »

I believe you're SUPPOSED to call suceed_quest AND then complete_quest... contrary to what Winter suggests.

Your problem may be that "somehow" your quest-ending dialog gets triggered twice thus complete_quest is called twice. No bloody idea why that would be happening.
Logged
Winter
I am Tek Jansen!
Administrator
*****
Offline Offline

Posts: 448


MBX Forum owner


View Profile WWW Email
« Reply #47 on: December 18, 2007, 05:03:14 PM »

The problem now is that succeed_quest doens't end the quest. check_quest_active evaluates to true (see the first dialog), causing the dialog option to show up again. Also, the whole script in the conditions block of the second dialog seems to be running twice, since I get duplicate messages of everything on the screen (the gold, xp, and message saying the quest is succeeded).

Alright, I stand correct, the end_quest is not the problem (which I didn't know before) -- the problem is that your conditions block is being evaluated twice for some stupid reason I can't determine.

Which brings up the question of why those ops are in your conditions block in the first place, and not the consequences block where they would only ever be evaluated when they're supposed to . . .
Logged


STREET: Losing your mind has never been so much fun . . .
fujiwara
Master
*****
Offline Offline

Posts: 859


View Profile Email
« Reply #48 on: December 18, 2007, 05:33:34 PM »

Interesting...

The reason that stuff is in the conditions block is previous bad behavior of code in the consequences block not executing if the finalstate parameter is 'close_window'. I stopped putting any code in the consequences block when I figured that out. Since that is not the case here, I may try that again and see what happens.
Logged


The horses tend to get their legs caught in the catapult rather than being properly launched.
fujiwara
Master
*****
Offline Offline

Posts: 859


View Profile Email
« Reply #49 on: December 18, 2007, 10:04:29 PM »

Turns out that putting succeed_quest and complete_quest in the consequences block works like a champ. I'll have to design my dialogs a little better to work around this. Thanks guys!
Logged


The horses tend to get their legs caught in the catapult rather than being properly launched.
R4byde
Apprentice
*
Offline Offline

Posts: 5


View Profile Email
« Reply #50 on: March 04, 2008, 10:11:38 PM »

Sorry for raising the dead, but I need help. (Seriously.) I'm having a similar problem to the one experienced by Inukshuk where no matter what I do M&B hates my scripts. At first i thought it was a problem with my model, but if I just overwrite one of the default ones it works fine in-game.

This is the error I get:

CLICK BELOW FOR FULLSIZE
http://img85.imageshack.us/my.php?image=painse5.jpg

I already checked for missing brackets and such: there aren't any. I also get this error even if I make no changes other than to the path in "Module_Info.py". I've even tried compiling it to a different directory but I still get the line 686 error. I have also compiled it on another PC but I still got the same error.

I have M&B version 0.903 and I have the module system for 0.903, and am using Python 2.2.1 my scripting is all done in the latest version of Notepad++. The other computer I compiled it on had Python 2.2.3.

So, could this be related to my Python versions? Which versions do you guys use? Do the 0.903 module system files work for you? Does anyone have any ideas? (If not do you know anyone who want's a whole bunch of weapons models? :( )

Thanks for anything.
Logged
fujiwara
Master
*****
Offline Offline

Posts: 859


View Profile Email
« Reply #51 on: March 07, 2008, 08:43:54 PM »

I use Python 2.5.1. I'm not sure why using that version would cause issues, but we're almost to Python 3.0. Time to upgrade.
Logged


The horses tend to get their legs caught in the catapult rather than being properly launched.
R4byde
Apprentice
*
Offline Offline

Posts: 5


View Profile Email
« Reply #52 on: March 09, 2008, 01:18:39 AM »

Sorry, it took me awhile to get back to this. (Got REALLY sick on Friday.) Anyway it's fixed, and did indeed turnout to be my version of Python. Which is strange considering it's suppose to be forwards compatible.  ???

Thanks for the help.
Logged
DSparil
Apprentice
*
Offline Offline

Posts: 14


View Profile Email
« Reply #53 on: March 24, 2008, 06:12:01 AM »

Hi, I just released a new version of my mod, and the following error has been reported:

Quote
First Error happens when I enter the Towns or Meet the Vassal after I finished Large Battle(outside the City)(maybe More not only enter town or meet with Vassal)(It's Random may not happened or Happened Agains)

(Error is look like this but I dont know is it same error click Ignore to continue the play)
Second is happen during in the Map mode I dont know how


I did a search and found out that Onin No Ran and craftmod both had the same problem at some point. Help?
Logged
Winter
I am Tek Jansen!
Administrator
*****
Offline Offline

Posts: 448


MBX Forum owner


View Profile WWW Email
« Reply #54 on: March 24, 2008, 09:09:01 AM »



This one is dead easy. One of your operations is getting an invalid party ID fed to it. In this case it's party_add_members (opcode 1610 in header_operations), it's a trigger or simple trigger, and it's getting a party ID of -1 to work with.
Logged


STREET: Losing your mind has never been so much fun . . .
DSparil
Apprentice
*
Offline Offline

Posts: 14


View Profile Email
« Reply #55 on: March 24, 2008, 09:50:58 AM »

Ah thanks  :)
Horewer a new one has popped out:

Quote

It occasional happened when I talk to Enemy Lord (when his party has only himself) and when Captured Enemy Castle and Town.

After quick search it seems to be an error imported from BOW and its unique rewards.
Logged
Ron Losey
Master
*****
Offline Offline

Posts: 4483


View Profile Email
« Reply #56 on: March 24, 2008, 05:34:05 PM »

That's easy too.  An item is flagged both "unique" and "merchandise", so it it trying to add it to a merchant inventory but it can't.

ONR got that one before too.
Logged
DSparil
Apprentice
*
Offline Offline

Posts: 14


View Profile Email
« Reply #57 on: March 24, 2008, 05:42:10 PM »

Thats what I thought when I read the message, horewer, I searched for it then, and now again, and theres not a single item with both flags.
Logged
Ron Losey
Master
*****
Offline Offline

Posts: 4483


View Profile Email
« Reply #58 on: March 24, 2008, 10:34:04 PM »

Thats what I thought when I read the message, horewer, I searched for it then, and now again, and theres not a single item with both flags.

That's not good.  Well, I'm still betting that it's trying to place a unique-flagged item ... but if not in merchant inventory, I can't imagine where.
Logged
Winter
I am Tek Jansen!
Administrator
*****
Offline Offline

Posts: 448


MBX Forum owner


View Profile WWW Email
« Reply #59 on: March 25, 2008, 03:58:48 AM »

Easy way to narrow down the problem -- take the unique flag off all items in your mod and see if the assert goes away.
Logged


STREET: Losing your mind has never been so much fun . . .
Pages: 1 2 3 [4] 5 Print 
Jump to:  

Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Arcane Magic based on BlackDay by TechnoDragon.net | Buttons by Andrea