PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: Alexinno on 17 July, 2006, 09:16:31

Title: Guarding
Post by: Alexinno on 17 July, 2006, 09:16:31
Hi everybody!
Can someone help me with this ?
I have this error in the Guarding.lua script

Test-Hub\scripts\Guarding.lua:707: bad argument #1 to `find' (string expected, got nil)

somewhere in this area

function MyINFOArrival(user,sData)

Title: Re: Guarding
Post by: Typhoon on 19 July, 2006, 08:44:47
go to line 707 and find this local s,e,tmp = string.find(user.sDescription,"(%b<>)");

then change it into this 

local s,e,tmp = string.find(user.sDescription,"(%b<>)") or "n/a";

that should do the trick .

Typhoon?
Title: Re: Guarding
Post by: Putte on 15 October, 2006, 14:51:48
In fact i have the same problem, and i do as the solution says, change the line 707, but the problem it's still there.  :'(
Do I need to restart the hub, think it will be enough to restart the script  ??? which i did...

//Putte
Title: Re: Guarding
Post by: bastya_elvtars on 15 October, 2006, 15:38:23
local tmp; if user.sDescription then s,e,tmp = string.find(user.sDescription,"(%b<>)") end
Title: Re: Guarding
Post by: Putte on 16 October, 2006, 00:36:12
Will try that to, tnx!
//Putte