Vice City: Multiplayer

VC:MP Discussion => Support => Topic started by: zeko on Jun 11, 2015, 07:49 AM

Title: Clanstats Error Sometimes
Post by: zeko on Jun 11, 2015, 07:49 AM
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

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi62.tinypic.com%2Fop79s5.png&hash=5fa7198decbd6f64bb550d336691e7b17e9a0044)

FUnction

http://pastebin.com/PKwG0Du3
Title: Re: Clanstats Error Sometimes
Post by: Kratos_ on Jun 11, 2015, 08:28 AM

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 .
Title: Re: Clanstats Error Sometimes
Post by: . on Jun 11, 2015, 08:48 AM
But what's the actual error message? We can't possibly test your code out of context like that.
Title: Re: Clanstats Error Sometimes
Post by: zeko on Jun 11, 2015, 04:07 PM
well i replace
Tag = FindClan( string ),
to
Tag = FindClan( string ).toupper(),
server got bugged i mean server not loaded
Title: Re: Clanstats Error Sometimes
Post by: Thijn on Jun 11, 2015, 07:32 PM
What's the f***ingERROR MESSAGE?
Title: Re: Clanstats Error Sometimes
Post by: zeko on Jun 14, 2015, 10:06 AM
well i lost the bug message that i saved on pic
btw when i try the kartoz advice another bug Appared
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs1.postimg.org%2Fz68m2rnwf%2FUntitled.png&hash=5c9265f062eb51153f944b2d1cac1f6a9f16a2f5)

FUnciton

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs1.postimg.org%2Fqp93ruj7i%2FUntitled1.jpg&hash=3ec195314bb8ebf84c867ce6f8f6800b7f5ad3eb)
Title: Re: Clanstats Error Sometimes
Post by: . on Jun 14, 2015, 02:54 PM
Poor S.L.C and his sanity (http://forum.vc-mp.org/?topic=667.msg4281#msg4281).
Title: Re: Clanstats Error Sometimes
Post by: zeko 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
Title: Re: Clanstats Error Sometimes
Post by: . on Jun 15, 2015, 04:19 PM
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 ]
Title: Re: Clanstats Error Sometimes
Post by: Kratos_ on Jun 16, 2015, 08:04 AM

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 (;) .

Title: Re: Clanstats Error Sometimes
Post by: zeko on Jun 16, 2015, 02:34 PM
OH Thanks Kartoz my script is now loaded susccessfull
now if i got any error again i will came here
Title: Re: Clanstats Error Sometimes
Post by: zeko on Jun 17, 2015, 05:19 AM
sory but i got another error by applying your all steps ( KARTOZ )

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs14.postimg.org%2Florufc25t%2FUntitled1.png&hash=07b5baf163825eeb83e5601aac8dbd1adbd3da96)


(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs14.postimg.org%2Fknrlq7l68%2FUntitled.jpg&hash=1f4dd57c69bee592d53b0ead9c7ae6ba1cf5c301)
Title: Re: Clanstats Error Sometimes
Post by: . on Jun 17, 2015, 05:34 AM
I'm trying so hard to be calm right now. But it's really hard :'(
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs23.postimg.org%2F7jm9n39cb%2FUntitled.png&hash=5b3a62d5c942fc47d419d52d4fc955bd02fc8de3)
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs21.postimg.org%2Fia26eeref%2FUntitled1.png&hash=4d34d41e117bfd2f6a1bc3cd55d90b5529b77bcd)
Title: Re: Clanstats Error Sometimes
Post by: zeko on Jun 17, 2015, 08:55 AM
poor S.L.C :'(
so its better if i remove the line bcz its not exist on script -_-