Page 1 of 1

How to use the print function in lua?

Posted: Wed Jan 02, 2008 1:38 pm
by Eagle Eye
I tried the following script to make players respawn in a vehicle and this works fine!
However, how can i make the print function to work?

Code: Select all

OnCharacterSpawn( 
function(player)
if GetObjectTeam(GetCharacterUnit(player)) == 2 then
print("Characters are on team 2")
EnterVehicle(player, "Vehspawn1")
end
end
)

Re: How to use the print function in lua?

Posted: Wed Jan 02, 2008 5:53 pm
by [RDH]Zerted
The print function prints out to the error log.

If you want to see [Null] in the game, use ShowMessateText("")

Re: How to use the print function in lua?

Posted: Thu Jan 03, 2008 7:43 am
by Eagle Eye
Thanks Zerted