Topic: Scripting

Hey, if you need to concatenate two strings and compare them how do you do that?

item = "gun"
inventory = {}


answer = io.read()

if answer == "take" + item then
inventory[1] = item
end

Re: Scripting

Hmm in lua i think its like this:

if answer == "take"..item then 

(then it does not matter if "item" is a number too...for example item=11  so take11 is result...

Last edited by pleedian (2013-04-18 15:44:24)