PDA

View Full Version : i cant talk with Npc



rikardo
05-04-2012, 12:31 AM
Hello all, today i was use one of my script and when the bot was talk with NPC it return a error.

the error is:
[XenoScript] hellheim_full.lua:hellheim_full.lua Invalid number of arguments [106780472 required]!

The script i use to talk with Npc is

elseif (labelName == "label") then
delayWalker(5000,10000)
Self.Say("hi")
wait(1500)
Self.SayToNpc("go")
wait(1500)
Self.SayToNpc("helheim")
wait(1500)
Self.SayToNpc("yes")

and after check the updated i try use the .lua above and it return the same error


elseif (labelName == "label") then
delayWalker(5000,10000)
Self.SayToNpc ({"hi", "go", "helheim", "yes"}, 65)


why this error occours ?

DarkstaR
05-04-2012, 08:40 AM
I made some changes to the scripting system and due to the 9.53 release I didn't get to thoroughly test them. The functions I did test worked but I hand't encountered these problems yet. I'm working on patching up all of the issues and releasing an update.

Edit: Your problem is this invocation: delayWalker(5000,10000).
delayWalker() only takes a single parameter and does not support 2 parameter randomization. In this case, the protection I added worked exactly as it should, informing you that your call is malformed. The only problem is that the error message is incorrect (fixed in next update). It should look like this:
04:44 [XenoScript] test npc say.lua: luaDelayWalker Invalid number of arguments [2 supplied, 1 required]!

rikardo
05-04-2012, 12:13 PM
Hello Darkstar
For a moment I thought it would be this, but I was being too obvious so I ended up not doing it because I thought it was more complex than this, but now I'm at work and when I get home I'll make this change to see if it works and send you a report here telling if it worked or not.

thx