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).
Code:
code = while (x <= 5){ if (get_stat(x,13) > 0){ change_char_energy(x,-299); set_char_status(13,10,1,0); } x = x + 1; }break;
(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.