PtokaX forum

PtokaX => Bugs => Topic started by: plop on 25 November, 2003, 02:20:54

Title: weird strfind problem on testdrive 4
Post by: plop 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
Title:
Post by: c h i l l a on 25 November, 2003, 09:21:40
simple on dataarrival  the user got no sMyInfoString..  maybe a few seconds later  do it like this...

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
Title:
Post by: plop on 25 November, 2003, 17:21:47
no it's the oposite.
on dataarival it is there, but on newuserconnected not.

plop
Title:
Post by: c h i l l a on 25 November, 2003, 19:15:26
lol i got it the other way around, lol
Title:
Post by: plop on 11 December, 2003, 00:33:08
QuoteOriginally 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.
Title:
Post by: [ES]latinmusic on 11 December, 2003, 00:34:31
Notrabit huh? Nice to see around one more time!.
Title:
Post by: NotRabidWombat 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:
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
Title:
Post by: plop 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
Title:
Post by: Optimus 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  :]