A Quick Debug

AuthorTopic: A Quick Debug
Warrior
Member # 8872
Profile #0
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?

[ Friday, March 21, 2008 12:30: Message edited by: Fractal ]

--------------------
Slarty: "Why don't we all just get along?"

The Mystic: "Vista is a funky and finicky OS to begin with."
Posts: 197 | Registered: Saturday, June 2 2007 07:00
Agent
Member # 5814
Profile #1
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.".

--------------------
"What can you do with an anthropology degree other than study people?"

"...Hunt people?"
Posts: 1115 | Registered: Sunday, May 15 2005 07:00
Shock Trooper
Member # 10488
Profile #2
And you can put the overflow in the second pair of quotes.
Posts: 334 | Registered: Friday, September 14 2007 07:00
Lifecrafter
Member # 7538
Profile Homepage #3
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.

--------------------
Do not provoke the turtles.
They do not like being provoked.

-Lenar

Always remember, kids: every time you 'lol', God kills a kitten.

My website: Nemesis' Refuge (Last Update: 3/7/08)
Posts: 743 | Registered: Friday, September 29 2006 07:00
Shaper
Member # 3442
Profile Homepage #4
A string can be 255 characters long, I think, so anything longer will cause an error.

--------------------
Nikki's Nook - will you remember his name?
Posts: 2864 | Registered: Monday, September 8 2003 07:00
Warrior
Member # 8872
Profile #5
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.

[ Saturday, March 22, 2008 06:33: Message edited by: Fractal ]

--------------------
Slarty: "Why don't we all just get along?"

The Mystic: "Vista is a funky and finicky OS to begin with."
Posts: 197 | Registered: Saturday, June 2 2007 07:00
Shaper
Member # 3442
Profile Homepage #6
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:

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:

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.");


[ Saturday, March 22, 2008 06:31: Message edited by: Johnny The Horse. ]

--------------------
Nikki's Nook - will you remember his name?
Posts: 2864 | Registered: Monday, September 8 2003 07:00
Shaper
Member # 7472
Profile Homepage #7
Also, you can use the following calls to make larger dialog boxes.
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.

--------------------
Hz'ii'zt a'iiencf coxnen a'bn'z'p pahuen yzpa'zuhb be'tt'phukh'kn az'ii'ova mxn't bhcizvi'fl?

Nioca's Citadel - A resource for BoA graphics and scripts, as well as my scenarios.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
Infiltrator
Member # 5576
Profile Homepage #8
See here for an explanation.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
"Verbs for the weak!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Law Bringer
Member # 4153
Profile Homepage #9
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.

--------------------
Gamble with Gaea, and she eats your dice.
Posts: 4130 | Registered: Friday, March 26 2004 08:00
Warrior
Member # 8872
Profile #10
Thanks a lot! Everything's good now.

--------------------
Slarty: "Why don't we all just get along?"

The Mystic: "Vista is a funky and finicky OS to begin with."
Posts: 197 | Registered: Saturday, June 2 2007 07:00