Community Forum

Script function print

Forum Overview >> Scripting

Created18.06.2009 21:28

Claudio Accotardi (Unknown) 18.06.2009 21:35
Hi ,
I have used the function "print" into file lua after "function XXXX:load(xmlFile)" so:
print ("hello world");
but I don't see at the screen the words.
After I have proved to use the function so:
print(getXMLInt(xmlFile, "vehicle.drums#count"));
but the game start and the screen is black.
Can you help me?
Best regards

Matthias B. (Unknown) 18.06.2009 23:17
you will not see the words on the screen, you have to enable the console in your game.xml

Christian Ammann - GIANTS Software 18.06.2009 23:53
You can enable the console with the tilde key when dev controls are enabled in game.xml.

Claudio Accotardi (Unknown) 19.06.2009 19:06
Best regards

Claudio Accotardi (Unknown) 19.06.2009 19:49
If I write print("Hello world"), into console I see them but if I write:

local partname = string.format("vehicle.animParts.part".."%d", 1);
local nameR = getXMLString(xmlFile, partname.."#name");
print("My print", partname, nameR);

into console I don't see nothing.

That I mistake?

Best regards

Matthias B. (Unknown) 19.06.2009 23:00
local count = getXMLInt(xmlFile, "vehicle.animParts#count")

for i = 1, count do
local partname = string.format("vehicle.animParts.part".."%d", i);
local nameR = getXMLString(xmlFile, partname .."#name");
print("My print" .. partname .. nameR);

i think that works!

Claudio Accotardi (Unknown) 20.06.2009 09:54
Best regards

Note: Log in to post. Create a new account here.