Author Topic: weird strfind problem on testdrive 4  (Read 3549 times)

0 Members and 1 Guest are viewing this topic.

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
weird strfind problem on testdrive 4
« on: 25 November, 2003, 02:20:54 »
these 2 are the problem.
local s,e,string = strfind(usr.sMyInfoString, "(%b<>)%$")
local s,e,tag = strfind(user.sMyInfoString,"(%b<>)%$")
both work on 0.3.3.0
but the last 1 doesn't seem 2 wanne work on testdrive (4), on NewUserCon... it returns nil, but on DataArival it works fine again.


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 <----<<

PtokaX forum

weird strfind problem on testdrive 4
« on: 25 November, 2003, 02:20:54 »

Offline c h i l l a

  • Lord
  • ***
  • Posts: 347
  • Karma: +1/-0
(No subject)
« Reply #1 on: 25 November, 2003, 09:21:40 »
simple on dataarrival  the user got no sMyInfoString..  maybe a few seconds later  do it like this...

Code: [Select]
function NewUserConnected(curUser)
local s,e,string = strfind(curUser.sMyInfoString, "(%b<>)%$")
if string then
SendToAll(string)
end
end

function DataArrival(curUser, data)
if (strsub(data,1,7) == "$MyINFO") then
local s,e,tag = strfind(data,"(%b<>)%$")
if tag then
SendToAll(tag)
end
end
end

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #2 on: 25 November, 2003, 17:21:47 »
no it's the oposite.
on dataarival it is there, but on newuserconnected not.

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 <----<<

Offline c h i l l a

  • Lord
  • ***
  • Posts: 347
  • Karma: +1/-0
(No subject)
« Reply #3 on: 25 November, 2003, 19:15:26 »
lol i got it the other way around, lol

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #4 on: 11 December, 2003, 00:33:08 »
Quote
Originally posted by NotRabidWombat
Try "(%b<>)$" instead of "(%b<>)%$"

Your search was looking for <....>$ because you escaped the $ (normally anchor to the end)

-NotRabidWombat
i do want 2 find that $, this 2 make sure i get the right tag incase some wiseass enters with 2 tags.
$MyINFO $ALL [TGA-OP]plop ikke<++ V:0.305,M:A,H:1/1/0,S:2><++ V:0.304,M:A,H:0/1/1,S:4>$ $DSL$halllllllllllo$202528377070$
the last tag as you know is the real and has that trailing $.

plop

* good 2 see you back buddy, hope it's 2 stay, sure missing you a lot.
« Last Edit: 11 December, 2003, 00:33:48 by 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 <----<<

Offline [ES]latinmusic

  • Triple Ace
  • **
  • Posts: 236
  • Karma: +1/-0
(No subject)
« Reply #5 on: 11 December, 2003, 00:34:31 »
Notrabit huh? Nice to see around one more time!.

Offline NotRabidWombat

  • Lord
  • ***
  • Posts: 384
  • Karma: +2/-0
(No subject)
« Reply #6 on: 11 December, 2003, 07:25:43 »
Oh I see. I misunderstood. I thought you were trying to do the same thing a different way, ie: anchoring at the end so they couldn't be sneaky. Nice way of doing it :-)

I tried it out:
Code: [Select]
function NewUserConnected(curUser)
local s,e,string = strfind(curUser.sMyInfoString, "(%b<>)%$")

SendToAll("test", string or "nil");
end
and this produced:

[01:15] <++ V:0.305,M:A,H:1/0/1,S:3>
[01:16] <++ V:0.305,M:A,H:1/0/0,S:4>

See if this simple version works or maybe you have a crazy TestDrive 4 to go with your crazybot ;-)

Sorry guys, I'm just popping in to let you all know I'm alive. And scheming :-D

-NotRabidWombat
« Last Edit: 11 December, 2003, 07:29:28 by NotRabidWombat »


I like childish behavior. Maybe this post will be deleted next.

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #7 on: 11 December, 2003, 13:39:22 »
lol, the crazyness must be infective.
i now see i posted it wrong in the start, problem is the other way around, 0.3.3.0 gives the problem.  lol
artificial insanety is the bot were faking a tag is the worsed idea, if it's done slightly bad your kicked or even banned.
allready seen guy's complain about it on the stealth forum. gnagnagna.
thats for me the best compliment i can get.

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 <----<<

Offline Optimus

  • Emperor
  • **
  • Posts: 1 474
  • Karma: +13/-1
(No subject)
« Reply #8 on: 11 December, 2003, 14:20:49 »
Yes Rabid me also find it nice to see you back on the forum... You allways have been most helpfull thx

well me leave it like this... Mr. Bunny  :]

PtokaX forum

(No subject)
« Reply #8 on: 11 December, 2003, 14:20:49 »