Okej więc zadeklarowałem wartość zmiennej tam gdzie mam księgę, no i... nadal Syntax error wali.
Kod księgi
//////////////// \\\\\\\\\\\\\\\\\\
INSTANCE CzystaKsiega (C_ITEM)
{
name = "Czysta Ksiega";
mainflag = ITEM_KAT_DOCS;
flags = ITEM_MISSION;
visual = "ItWr_Book_02_03.3ds";
material = MAT_LEATHER;
scemeName = "MAP";
on_state[0] = UseCzystaKsiega;
description = name;
TEXT[0] = "";
};
FUNC VOID UseCzystaKsiega()
{
var int nDocID;
tekst = ConcatStrings(x, ConcatStrings(" ", xn));
nDocID = Doc_Create () ; // DocManager
Doc_SetPages ( nDocID, 2 ); //wieviel Pages
Doc_SetPage ( nDocID, 0, "Book_Mage_L.tga", 0 );
Doc_SetPage ( nDocID, 1, "Book_Mage_R.tga", 0 );
//1.Seite
Doc_SetFont ( nDocID, -1, "font_15_book.tga" ); // -1 -> all pages
Doc_PrintLine ( nDocID, 0, "");
Doc_PrintLine ( nDocID, 0, "");
Doc_SetMargins ( nDocID, 0, 275, 20, 30, 20, 1 ); // 0 -> margins are in pixels
Doc_PrintLine ( nDocID, 0, " " );
Doc_SetFont ( nDocID, -1, "font_10_book.TGA" ); // -1 -> all pages
Doc_PrintLine ( nDocID, 0, "");
Doc_PrintLine ( nDocID, 0, "");
Doc_PrintLines ( nDocID, 0, tekst);
Doc_PrintLines ( nDocID, 0, "");
//2.Seite
Doc_SetMargins ( nDocID, -1, 30, 20, 275, 20, 1 ); // 0 -> margins are in pixels (Position des Textes von den Ränder des TGAs aus, links,oben,rechts,unten)
Doc_PrintLine ( nDocID, 1, "");
Doc_PrintLine ( nDocID, 1, "");
Doc_PrintLine ( nDocID, 1, "");
Doc_PrintLine ( nDocID, 1, "");
Doc_PrintLines ( nDocID, 1, "");
Doc_PrintLine ( nDocID, 1, "");
Doc_PrintLine ( nDocID, 1, "");
Doc_PrintLine ( nDocID, 1, "");
Doc_Show ( nDocID );
};
początek pliku story_globals.d
// *************************
// Globalvariablen für Story
// *************************
// *************************
var string zmienna1;
var string zmienna2;
var string tekst;