Text Variables in Message/Question Boxes

Maps and the art of mapmaking.
JagoBC
Leprechaun
Leprechaun
Posts: 29
Joined: 29 May 2006

Text Variables in Message/Question Boxes

Unread postby JagoBC » 06 Apr 2007, 01:30

Has anyone been able to make variables that contain text strings appear in a questionbox? For instance, the following text file is created and saved as a resource file called TextFile.txt:

Would you like to sacrifice <value=GNumber> <value=GName>?

it is evoked with the following code:

QuestionBox({"TextFile.txt"; GNumber = 3, GName = "Sprites"}, "Callback");

but the QuestionBox which appears says:

Would you like to sacrifice 3 ?

(Notice the spaces after the 3.)

Does anyone know why?

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 06 Apr 2007, 13:08

See http://elrath.com/forums/index.php?showtopic=708

Your problem is that you can't give words as values, what you have to do is create a text file that has Sprites written in it.

Btw the space after the 3 is the space between your 2 values.

I used the complex question box in my map to know what skills you'll be able to choose in the university before getting the question boxes.

JagoBC
Leprechaun
Leprechaun
Posts: 29
Joined: 29 May 2006

Unread postby JagoBC » 24 Apr 2007, 06:48

Ge-esh! When I first read your response I thought I was gonna have to create a text file for every freakin' creature in the game. Fortunately I stopped and thought for a minute and realized they must already exist somewhere and I was right. I just needed to refernce the correct files in the database. Anyway, I took a look at your map and learned about the very helpful ".." way of compiling a complex file reference--so thanks dude you are a lifesaver!


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: Semrush [Bot] and 5 guests