Log in

View Full Version : [Code] Need a little help with talking to a NPC



kreteno
04-07-2016, 04:31 PM
Hello, I'm trying to create a .lua file with just one function and that is talking to a npc. I do not know what i'm doing wrong here. Sometimes it says there needs to be another end to close ')' at line x, but if I try to edit it, it sometimes doesn't even print the error, just closes the script.

function onWalkerSelectLabel(labelName)

if (labelName == "Mission") then
Walker.Stop()
wait(2500,3000)
Self.SayToNpc({"Hi", "Mission", "yes",}, 80)
wait(800,1740)
Walker.Start()
end
end

Fatality
04-07-2016, 05:05 PM
function onWalkerSelectLabel(labelName)
if (labelName == "Mission") then
--Walker.Stop() Not needed.
--wait(2500,3000) Why the big ass wait?
--Self.SayToNpc({"Hi", "Mission", "yes",}, 80)
-------------------------------------- ^ Thats the error
Self.SayToNpc({"Hi", "Mission", "Yes"}, 80)
--wait(800,1740) big ass wait v2
--Walker.Start() Not needed.
end
end