BANME string problem
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

BANME string problem

Started by TTB, 28 February, 2005, 16:25:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TTB

Hi,

I almost finished my BanMe script... But there is one big problem... I can't make the reason part work... I'll explain:

The user kan timeban himself with the time he/she gives... Now I want it like this:
#banme
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

plop

local s,e,time,reason= strfind(data,"%b<>%s+%S+%s+(%A+)+s%+(.+)")
you made a tiny typing error here.
before grabbing the reason you typed +s%+
this should be %s*
and as the reason can be optional you should also replace (.+) for (.*).
+ means 1 or more, while * means 0 or more (returns "" when not found).

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

TTB

Hi,

first of all, thanx for your reply plop. I have spent a lot of time on this script because I like this language and try to understand this language very well... :)

I have changed the string, indeed, that was a little typing error. After fixing this, I still got the same problem.

String:
local s,e,time,reason= strfind(data,"%b<>%s+%S+%s+(%A+)+%s+(.*)")

I have tried also some other things, like changing (.*) into (%S+)... Same problem.

Maybe something else I have to change?
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

SMF spam blocked by CleanTalk