set_char_status and set_party_status calls
Author | Topic: set_char_status and set_party_status calls |
---|---|
Apprentice
Member # 5815
|
written Sunday, May 15 2005 17:18
Profile
Hello: This regards using the calls set_char_status and set_party_status during dialogue; I have had some difficulty getting them to work. I have isolated the problem to one line, I think: the following code works perfectly if the line "set_char_status(13,10,1,0);" is omitted, but encounters an error if that line is added (regardless of the values used). (oh, yeah, x has been set to 0 above) The error message is displayed in a separate window, when the dialogue script is accessed (i.e., anyone in the town is spoken to). It is unlike other BofA errors in the appearance of the window, and reads: Unhandled Exception: c0000005 At address: 00439ab0 Is this a bug, or am I doing something wrong? I don't have much experience with Avernumscript or c, so any insights at all would be much appreciated. Thanks, and sorry if it's a dumb question! P.S. What I'm trying to do is look for mages in the party, dumbfound them, and take away their spell energy. It's a non-combat situation, more of a plot point to demonstrate a friendly NPC's power. I thought of 10 possibly being an invalid value for dumbfounding (status 13), but the code doesn't work for any other status either. [ Sunday, May 15, 2005 17:19: Message edited by: Latha Luain ] Posts: 2 | Registered: Sunday, May 15 2005 07:00 |
Off With Their Heads
Member # 4045
|
written Sunday, May 15 2005 17:33
Profile
Homepage
Check the Appendices again. void set_char_status(short which_char_or_group,short which_status,short how_much,short is_forced,short give_update) That's five parameters. You're only giving it four numbers. You probably want set_char_status(x,13,10,1,0); EDIT: But yes, it is pretty annoying that BoA doesn't just tell you that you have the wrong number of parameters. [ Sunday, May 15, 2005 17:34: Message edited by: Kelandon ] -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Apprentice
Member # 5815
|
written Monday, May 16 2005 04:09
Profile
Hi again, and thanks for the reply. Sorry, I must've mixed up the code I pasted. I've tried pretty much everything to see if I'd misunderstood the syntax, including checking many parameter combinations. For my post, I was probably thinking of the set_party_status call, which I also tried, and which doesn't require you to specificy a character. Anyways, I took your suggestion, double-checked I hadn't made any other blunders, and got exactly the same error. However, then I realized something. The same call works in another town script of mine, where buying beer in an inn makes you drunk. So I poked around a bit, and realized that even entering the room to talk to the character in question calls up the same error (I'd previously just been talking through the window to save time during testing). Do you think the townscript or scenario .bas file or something might be corrupted? There is no special encounter or terrain script or anything in that room... Posts: 2 | Registered: Sunday, May 15 2005 07:00 |
Off With Their Heads
Member # 4045
|
written Monday, May 16 2005 04:13
Profile
Homepage
Unhandled Exception errors tend to be graphical about as often as not, so that's where I'd start. Are you using any custom graphics? Or a custom object (monster, terrain, etc.) that uses a different graphic from its default, even if the graphic is not custom? If not, are you using any custom creature scripts? Is anything in the town's START_STATE? -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |