Author Topic: Convert simple function  (Read 1962 times)

0 Members and 1 Guest are viewing this topic.

Offline QuikThinker

  • Lord
  • ***
  • Posts: 279
  • Karma: +2/-0
Convert simple function
« 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.

PtokaX forum

Convert simple function
« on: 11 March, 2005, 04:03:27 »

Offline bolamix

  • Triple Ace
  • **
  • Posts: 169
  • Karma: +4/-0
(No subject)
« Reply #1 on: 11 March, 2005, 06:21:53 »
Hi,
Fyi, new Arrivals are detailed in "Scripting-Interface.txt" in your ptokax folder.

So instead of
Code: [Select]
function 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 use
Code: [Select]
function ToArrival(curUser, sData)
s,e,whoTo = string.find(sData,"$To:%s+(%S+)")

Hope this helps ;)
« Last Edit: 11 March, 2005, 06:23:42 by bolamix »
Sharing is of the essence!

Live music >> Aiwadirock! live music hub
PtokaX knowledge >> The PtokaX Wiki

Offline QuikThinker

  • Lord
  • ***
  • Posts: 279
  • Karma: +2/-0
(No subject)
« Reply #2 on: 11 March, 2005, 12:23:46 »
Thanx a lot man :)

Offline bolamix

  • Triple Ace
  • **
  • Posts: 169
  • Karma: +4/-0
(No subject)
« Reply #3 on: 11 March, 2005, 22:43:13 »
my pleasure ;)
Sharing is of the essence!

Live music >> Aiwadirock! live music hub
PtokaX knowledge >> The PtokaX Wiki

PtokaX forum

(No subject)
« Reply #3 on: 11 March, 2005, 22:43:13 »