Kyshakk Koan La paix Posted March 21, 2008 Posted March 21, 2008 EDIT: Oh dear. Sorry. I fixed my own problem. I thought dialogs weren't working, but I realised I forgot to set the town script! Anyway, I must continue working on my first scenario... RE-EDIT: Gah! The game complains that the following string is too long: message_dialog("You enter a walled building in the middle of this large swamp. You pass through the damaged gates and see what looks like the site of a magical disaster. It looks as if something either escaped or got in the large construct in the center of the building. A small building is near the construct. Perhaps you can find answers there.",""); Solution? Quote
Unflappable Drayk John S Posted March 21, 2008 Posted March 21, 2008 As I was writing a message that the location of the town script was the problem, you edited your post! Anyway, if a string is too long, it means that the section in quotes is too large to be displayed. So in this case, you need to shorten the part which reads "You enter a walled building in the middle of this large swamp. You pass through the damaged gates and see what looks like the site of a magical disaster. It looks as if something either escaped or got in the large construct in the center of the building. A small building is near the construct. Perhaps you can find answers there.". Quote
Understated Ur-Drakon Celtic Minstrel Posted March 21, 2008 Posted March 21, 2008 And you can put the overflow in the second pair of quotes. Quote
Ineffable Wingbolt aka Ravenwing Posted March 21, 2008 Posted March 21, 2008 Just make sure the cutoff is in a place that makes sense. Maybe put the cutoff between "…center of the building." and "A small building is near the construct." That should take care of the oversized string, and the passage will still make technical sense. Quote
Magnificent Ornk nikki. Posted March 21, 2008 Posted March 21, 2008 A string can be 255 characters long, I think, so anything longer will cause an error. Quote
Kyshakk Koan La paix Posted March 22, 2008 Author Posted March 22, 2008 Thanks! However, my goal is to make a standard dialog popup. Why can't it be this long? I've seen many longer dialogs. Am I using the wrong call? === Also, if anyone knows of a good OS X resource editor that is preferably free, I could really use it. Not being able to see the icons and sheets can be troublesome. Quote
Magnificent Ornk nikki. Posted March 22, 2008 Posted March 22, 2008 Yes and no. If you use the call "message_dialog()", you can only have two strings of 255 character each. The two strings are separated by the comma. Like this: Code: message_dialog("THIS IS THE FIRST STRING.","AND THIS IS THE SECOND"); If you want more than two strings, you can use more than one message_dialog. I suspect though, that this will work: Code: message_dialog("You enter a walled building in the middle of this large swamp. You pass through the damaged gates and see what looks like the site of a magical disaster.","It looks as if something either escaped or got in the large construct in the center of the building.A small building is near the construct. Perhaps you can find answers there."); Quote
Understated Ur-Drakon Nioca Posted March 22, 2008 Posted March 22, 2008 Also, you can use the following calls to make larger dialog boxes. Code: reset_dialog();add_dialog_str(0,"This is a string",0);add_dialog_str(1,"This is another string, made by incrementing the first number in the call",0);add_dialog_str(2,"This is yet another string",0);add_dialog_str(3,"This is an indented string, which is done by changing the second number in the call to any positive value other than 0",20);add_dialog_str(4,"This is a heavily indented string; the greater the second number, the larger the indent",100);add_dialog_str(5,"Each string is limited to 255 characters, and this is the maximum number of strings possible via this method"0);run_dialog(1); // And this runs the whole thing. The number simply indicates whether or not the player can record the message. It may look complicated, but it's actually very straight-forward once you get used to it. Quote
Well-Actually War Trall Niemand Posted March 22, 2008 Posted March 22, 2008 See here for an explanation. Quote
Magnificent Ornk Ephesos Posted March 22, 2008 Posted March 22, 2008 Quote: Originally written by Fractal:Also, if anyone knows of a good OS X resource editor that is preferably free, I could really use it. Not being able to see the icons and sheets can be troublesome. You want GraphicAdjuster , then. Quote
Kyshakk Koan La paix Posted March 23, 2008 Author Posted March 23, 2008 Thanks a lot! Everything's good now. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.