Burgeoning Battle Gamma gcmaxxon Posted September 10, 2005 Share Posted September 10, 2005 Hi, Here is a piece of "for next" coding , Ops!, wrong language, that I do not quite understand. Quote: For example (i.e.) : i = 0 while (char_ok(i) == 0) {i = i + 1; } ... append_char_name(i); ... I guess my questions are : what character's name is appended? and just how is it displayed to the player? Thanks before hand for any help. gcmaxxon Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 10, 2005 Share Posted September 10, 2005 The name is appended to the buffer, which holds strings that you are appending. To get each character's name, the appending name line should go inside of the curly braces. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted September 11, 2005 Share Posted September 11, 2005 I'm guessing that he got that code out of one of my scenarios — the bracketing is distinctive. The idea is that the while loop finds the first living character. It starts with 0, and if 0 is dead, it checks 1, and so on until it finds the party leader. So i is the first living character, and that character's name is appended to the text buffer. That displays nothing. Notice a few lines later that there's this: Code: get_buffer_text(dlgstr);message_dialog(dlgstr,""); Or something along those lines. The get_buffer_text saves the text buffer to dlgstr, and then message_dialog pops up dlgstr. This is the way to make a message box address the leading character by name. Link to comment Share on other sites More sharing options...
Burgeoning Battle Gamma gcmaxxon Posted September 11, 2005 Author Share Posted September 11, 2005 Hi, Yes, you are correct. It is coding from "Castle Pudideum". I thought this was one (maybe the only way) way of displaying one of the party's name. Can I use your "dlgstr" coding? Thanks for the help. gcmaxxon Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted September 11, 2005 Share Posted September 11, 2005 Yes, you can use it. Link to comment Share on other sites More sharing options...
Recommended Posts