Ineffable Wingbolt Suspicious Vlish Posted July 10, 2004 Share Posted July 10, 2004 HELP! I'm having a crack at scripting, however, it's not working the way I thought it should. Here's the deal. When the party steps on a certain spot at town, I want a message displayed. I placed a special node at a spot, and let it be 11. Then I typed the script for my town. begintownscript; variables; body; beginstate 10; message_dialog("Testing, on two three"); break; However, I get an error. State not found - 0 Huh? Didn't I just define the state in my script? Link to comment Share on other sites More sharing options...
Curious Artila Gorvin Posted July 10, 2004 Share Posted July 10, 2004 Quote: Originally written by Waylander:State not found - 0Huh? Didn't I just define the state in my script? No, you defined state 10. There a few special states that you NEED to have defined in each town script. They are: Code: beginstate INIT_STATE;// This state called whenever this town is entered.break;beginstate EXIT_STATE;// Always called when the town is left.break;beginstate START_STATE;// This state is called every turn the party is in this town.break; When you first entered the town it looked for the INIT_STATE in your script (state 0), couldn't find it, and gave you an error. If you don't want anything special to happen on entrance, you can just leave that state empty, but it must be defined. Link to comment Share on other sites More sharing options...
Articulate Vlish Eric-Ihrno Posted July 11, 2004 Share Posted July 11, 2004 Also, the message_dialog command requires two strings, even if the second one is blank. For example: message_dialog("Testing, on two three",""); note the second set of quotes which do notheing but are required for the game to show the dialog box properly. Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Suspicious Vlish Posted July 11, 2004 Author Share Posted July 11, 2004 THANKS! It didn't show that in the example. Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Nerubian_Lord Posted July 16, 2004 Share Posted July 16, 2004 NOTE: The secoind set of quotes are used for something - for a second paragraph, since every paragraph can only be [some number] (think it was 256) characters long. So you can do like this: message_dialog("blablablablablablablablablablablablablablablablablablablablablablablablablablabla Ooops I think thats almost 256 char. long I 'll continue on the other paragraph","I'm continuing to write nonsense..."); Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted July 16, 2004 Share Posted July 16, 2004 Quote: Originally written by Nerubian_Lord:NOTE: The secoind set of quotes are used for something - for a second paragraph, since every paragraph can only be [some number] (think it was 256) characters long. So you can do like this: message_dialog("blablablablablablablablablablablablablablablablablablablablablablablablablablabla Ooops I think thats almost 256 char. long I 'll continue on the other paragraph","I'm continuing to write nonsense..."); Each thing can only be for 250 symbols long. It's annoying, but we've got to stick with it. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Crunchy Frog Posted July 16, 2004 Share Posted July 16, 2004 It's supposed to be 255, but I made a string 255 characters long and BoA complained at me. I shortened it to 254 and it was perfectly happy. Crazy stuff. Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Nerubian_Lord Posted July 17, 2004 Share Posted July 17, 2004 This is because BoA counts the 0 Link to comment Share on other sites More sharing options...
Garrulous Glaahk Crunchy Frog Posted July 18, 2004 Share Posted July 18, 2004 Yeah, I realised that soon after posting. 255 characters including the terminating null character, so effectively 254 characters. *grumbles at C strings* Link to comment Share on other sites More sharing options...
Recommended Posts