I use v 2.71 of AGS and first I had used Label.SetText but now I switched to Label.Text = ...
It's the same result. And I double-checked the nbr of characters and according to the word count in MS Word it's 195 character. So it is still < 200. Here's the text anyways:
Known by it's large leaves, the thief salvae is a brownish plant. The name comes from its dousing abilities commonly used by thieves. It grows in dark places, often inside caves or under bridges.
Here's the whole Book-code which handles everything concerning the books. I also added a check to see if it was really the text above and nothing else that was put in the label. And it was. I don't understand why I get an error! Shouldn't it truncate the text like you said, monkey?
// Main script for module 'Book'
#define BOOKSIZE 10
#define MAX_NBR_OF_BOOKS 10
struct BookContent {
String title[BOOKSIZE];
String text[BOOKSIZE];
int nbrOfPages;
bool read;
};
BookContent books [MAX_NBR_OF_BOOKS];
int currentBook;
int currentPage = 0;
static function Book::addPage(int bookNbr, String title, String text) {
int pageNbr = books[bookNbr].nbrOfPages;
books[bookNbr].title[pageNbr] = title;
books[bookNbr].text[pageNbr] = text;
books[bookNbr].read = false; // cannot have read whole book anymore
books[bookNbr].nbrOfPages++;
}
// Shows the BOOK gui and handles reading through the book
static function Book::readBook(int bookNbr) {
gBook.Centre();
currentBook = bookNbr;
books[bookNbr].read = true;
gcLTitle.SetText(books[bookNbr].title[0]);
gcRTitle.SetText(books[bookNbr].title[1]);
gcLPage.SetText(books[bookNbr].text[0]);
gcRPage.SetText(books[bookNbr].text[1]);
gcLNbr.SetText("1");
gcRNbr.SetText("2");
gBook.Visible = true;
}
static function Book::getCurrentBook() {
return currentBook;
}
static function Book::getNbrOfPages(int bookNbr) {
return books[bookNbr].nbrOfPages;
}
// Called when clicking on the turn page buttons or the close book button.
static function Book::interface_click(int interface, int button) {
if (interface == BOOK) {
int bNbr = currentBook;
String p1;
String p2;
String t1;
String t2;
if (button == 2 && currentPage > 0) //turning to a lower page
currentPage-=2;
if (button == 3 && currentPage < Book.getNbrOfPages(bNbr)-2) //turning to a higher page
currentPage+=2;
if (button == 2 || button == 3) {//turning the page
t1 = books[bNbr].title[currentPage];
p1 = books[bNbr].text[currentPage];
t2 = books[bNbr].title[currentPage+1];
p2 = books[bNbr].text[currentPage+1];
//checking if the text in p1 really is what I think it is.
Overlay* i = Overlay.CreateTextual(0, 30, 300, 0, 65472, p1);
WaitMouseKey(4000);
i.Remove();
gcLPage.Text = p1; //HERE COMES THE EXCEPTION
gcRPage.Text = p2;
gcLTitle.Text = t1;
gcRTitle.Text = t2;
} else if (button == 4) { //quit button
currentPage = 0; //resets page
gBook.Visible = false;
}
gcLNbr.SetText(String.Format("%d",currentPage+1));
gcRNbr.SetText(String.Format("%d",currentPage+2));
}
}