Clanstats Error Sometimes

Started by zeko, Jun 11, 2015, 07:49 AM

Previous topic - Next topic

zeko

my Clan stats work perfect but
this error appared sometimes i dont know why
i already post this error on 0.3 forum but all were unable to find the Solution

http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=2935.msg20138#msg20138



FUnction

http://pastebin.com/PKwG0Du3

Kratos_


Include an underscore in character class of Single Delimiter . This way :-

local S_DELIM = regexp(@"(\w.+[.*=_]+)") ;
One more vulnerability is that Findclan will return null in case no clan tag is found & then in get tag function you're attempting to
convert it to upper case without validating the actual clan tag existence .

// will throw error index toupper doesnot exist in case of normal player join [ Without any tag ]
local Tag = FindClan( string ).toupper(),

Tip -> Regexp becomes slow often . So , create a new search pattern entry only when previous search pattern fails to match , keeping the most frequent search pattern at the top to reduce some number of cycles .
In the middle of chaos , lies opportunity.

.

But what's the actual error message? We can't possibly test your code out of context like that.
.

zeko

well i replace
Tag = FindClan( string ),
to
Tag = FindClan( string ).toupper(),
server got bugged i mean server not loaded

Thijn

What's the f***ingERROR MESSAGE?

zeko

well i lost the bug message that i saved on pic
btw when i try the kartoz advice another bug Appared


FUnciton


.

.

zeko

@S.L.C did you mean i m trying to start that function which does not exist on script X.x

.

Quote from: Nihongo on Jun 15, 2015, 05:13 AM@S.L.C did you mean i m trying to start that function which does not exist on script X.x

I'm not even sure if that's a function. Could be anything. I don't see that in your posted code which means the error isn't even there.

Besides, wtf is this?
a[1] = 0, a[2] = X [ DEFINED BY SEPARATORS ]
More specifically this part:
[ DEFINED BY SEPARATORS ]
.

Kratos_


The clan tag needs to be split for the sake of generalization so that people could use as many customized tags as they want & the server will treat all those variations as part of an identical entity as long as alphanumeric values unchanged .

Whenever we need to split a string , we need to specify exactly where we want to perform those splittings . Those junctions are a heap of characters ( present in target string ) that we need to pass to split function as the 2nd argument .

Thereafter , split will return an array of sub-strings . Since , these junctions define the procedures for manufacturing sub-strings so they could be called as separaters informally .

The error is pretty obvious since you defined some locals & used keyword 'local' once so you need to use a comma (,) instead of a semi colon (;) .

In the middle of chaos , lies opportunity.

zeko

OH Thanks Kartoz my script is now loaded susccessfull
now if i got any error again i will came here

zeko

sory but i got another error by applying your all steps ( KARTOZ )





.

I'm trying so hard to be calm right now. But it's really hard :'(
.

zeko

#13
poor S.L.C :'(
so its better if i remove the line bcz its not exist on script -_-