PtokaX forum

Development Section => Your Developing Problems => Topic started by: QuikThinker on 11 March, 2005, 04:03:27

Title: Convert simple function
Post by: QuikThinker on 11 March, 2005, 04:03:27
How would I convert this simple routine?

function DataArrival(curUser, sData)
if ( strsub(sData, 1, 4) == "$To:" ) then

Thanx in advance.
Title:
Post by: bolamix on 11 March, 2005, 06:21:53
Hi,
Fyi, new Arrivals are detailed in "Scripting-Interface.txt" in your ptokax folder.

So instead offunction DataArrival(curUser, sData)
if(strsub(sData, 1, 4) == "$To:") then
data=strsub(sData,1,strlen(sData)-1)
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
you would usefunction ToArrival(curUser, sData)
s,e,whoTo = string.find(sData,"$To:%s+(%S+)")

Hope this helps ;)
Title:
Post by: QuikThinker on 11 March, 2005, 12:23:46
Thanx a lot man :)
Title:
Post by: bolamix on 11 March, 2005, 22:43:13
my pleasure ;)