PDA

View Full Version : lua: use variable where string is required



28seven
February 24th, 2010, 02:14 PM
this is more or less a lua question.

i am trigger an event

gir.TriggerEvent("1On", 2000, 0)
however i would like "1On" to be built from the variable RawZoneNumber and the constant string "On" if i were to print this it would be something like (RawZoneNumber,"On")

anyway to do this in the trigger event? if not what are the options?

harleydude
February 24th, 2010, 04:46 PM
Try

gir.TriggerEvent(RawZoneNumber.."On", 2000, 0)

28seven
February 24th, 2010, 06:31 PM
thats great. can i use that for calling tables also?

thanks