Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Ranking Error when user has 2x last star level
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

AceC
New Member

Cyprus
68 Posts

Posted - 26 April 2003 :  09:48:14  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
A user reached 6000 posts, and I started getting ruintime errors as soon as any of his messages came up.

Subscript out of range [number: 5]

line 133 inc_func_members.asp

By decreasing his post count to 5000, the problem went away, but he is close to notching up 6000 again.

I beleive it's something to do with the bonus count in inc_func_members but I just can't get my head round it at the moment.

Rem -User has reached the number of posts set for level Five
		  Rem -Will get an additional star
		  Rem -when his/her posts go up by the number of posts set for level Five 
		  if intRank = 5 then
		    intBonusRank = 0
		    intBonusPosts = clng(fM_POSTS - (cint(intRankLevel5)))
		    if intBonusPosts > 0 then intBonusRank = (intBonusPosts\(cint(intrankLevel5)))
		    intRank = intRank + intBonusRank
		  end if


line 133 comes in this Select Case:

  Select case fM_LEVEL
		  	Case "1"
		  		Rem -No Star to Normal Members if their posts are less then First Level
		  		if intRank = 0 then getStar_Level = strStar_Level : exit function
		  		strNewRankColor = arrRankColors(intRank - 1)
		  	 if intRank <= intMaxStars then intMaxStars = intRank
		  	Case "2"
		  		strNewRankColor = strRankColorMod
		  		intMaxStars = NewRank(strModStars, intRank, intMaxStars)
		  	Case "3"
		  		strNewRankColor = strRankColorAdmin
      intMaxStars = NewRank(strAdminStars, intRank, intMaxStars)
      Rem -Give An Extra Star to Super Admin
      if fM_ID = intAdminMemberID then intMaxStars = intMaxStars + 1
		   Case else
		  		getStar_Level = strStar_Level & "Error"
		  		exit function
		  end select


Any ideas apart from continually increasing the max star level (was at 3000 now at 6000 and the users post count now at 6757)?

And the hit's just keep on comin'

Edited by - Roland on 26 April 2003 11:24:05

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 April 2003 :  10:05:53  Show Profile
you should have posted this in the mod implementation forum, as it has to do with the mod for additional stars.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 26 April 2003 :  10:10:35  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
Sorry, I didn't realise that, if a mod could move it there, that'd be great

And the hit's just keep on comin'
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 26 April 2003 :  11:24:28  Show Profile
quote:
Originally posted by AceC

Sorry, I didn't realise that, if a mod could move it there, that'd be great


done
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 26 April 2003 :  12:13:55  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
Cheers, but can anyone decipher this and come up with a fix?

And the hit's just keep on comin'
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 26 April 2003 :  12:19:36  Show Profile
Try this code. I made some changes, though I have yet to test it. Changes are highlighted in green(commented out) and red(modified).


Rem -User has reached the number of posts set for level Five
Rem -Will get an additional star
Rem -when his/her posts go up by the number of posts set for level Five 
if intRank = 5 then
   intBonusRank = 0
   intBonusPosts = clng(fM_POSTS - (cint(intRankLevel5)))
   if intBonusPosts > 0 then intBonusRank = (intBonusPosts\(cint(intrankLevel5)))
   'intRank = intRank + intBonusRank
end if


line 133 comes in this Select Case:


Select case fM_LEVEL
    Case "1"
	Rem -No Star to Normal Members if their posts are less then First Level
	if intRank = 0 then getStar_Level = strStar_Level : exit function
	strNewRankColor = arrRankColors(intRank - 1) 	        
        if (intRank +intBonusRank) <= intMaxStars then intMaxStars = intRank +intBonusRank
    Case "2"
	strNewRankColor = strRankColorMod
	intMaxStars = NewRank(strModStars, intRank +intBonusRank, intMaxStars)
    Case "3"
	strNewRankColor = strRankColorAdmin
        intMaxStars = NewRank(strAdminStars, intRank +intBonusRank, intMaxStars)
        Rem -Give An Extra Star to Super Admin
        if fM_ID = intAdminMemberID then intMaxStars = intMaxStars + 1
    Case else
        getStar_Level = strStar_Level & "Error"
        exit function
end select


Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 26 April 2003 :  12:29:27  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
Cheers, will try it in a mo

And the hit's just keep on comin'
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 26 April 2003 :  12:42:44  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
Yeeha, it works.

Cheers GauravBhabu, see http://www.aircadetcentral.com/forums/topic.asp?TOPIC_ID=2824 and the user Cheeks who has 6759 posts now displays correctly.

And the hit's just keep on comin'
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 26 April 2003 :  18:04:50  Show Profile
You are welcome
Go to Top of Page

ErEf
New Member

Netherlands
74 Posts

Posted - 11 May 2003 :  04:06:02  Show Profile  Visit ErEf's Homepage
just one but

getting to that amount of posts will get one an extra star.
in my ranking a member can have max 5 stars. he'll reach that with 700 posts, so the error was at 1400 posts. that is fixed now. But now that member has 6 stars... I wanted to know what happens at 2100 (triple) posts... he got another extra star so 7 . I suspect it happens every time one has another 700 posts.

but that is always better than an error

If you think you can or you think you cannot, you are right. - Henry Ford

Edited by - ErEf on 11 May 2003 04:08:10
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 11 May 2003 :  04:12:40  Show Profile
i'm not familiar with this mod, but what did you expect to happen? when is a user supposed to get an extra star?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 May 2003 :  07:49:32  Show Profile
quote:
Originally posted by ErEf

just one but
...I suspect it happens every time one has another 700 posts.


I did this Mod and as far I remember that is how it should be.
Go to Top of Page

ErEf
New Member

Netherlands
74 Posts

Posted - 12 May 2003 :  03:25:24  Show Profile  Visit ErEf's Homepage
So when a member reaches 7000 posts he has allready 5 because he reached the max amount of posts requiered for the 5 stars (in my case of course) and another 9 extra, makes 14 in total, which is more than admins and mods can get.

Is it possible to get arround that? that the max stars is the max?

If you think you can or you think you cannot, you are right. - Henry Ford
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 12 May 2003 :  06:58:37  Show Profile  Visit masterao's Homepage
ErEf, you don't add the forum standard max stars to the mod's max stars, the mod replaces the forum max stars. With your example, a member with 7000 posts will have 9 stars.

The mod works for all members, including moderators and admins. Furthermore, you can set so that admins and moderators (separately) have normal (based on post count), one star always, one star minimum, or maximum number of stars.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

ErEf
New Member

Netherlands
74 Posts

Posted - 12 May 2003 :  18:12:58  Show Profile  Visit ErEf's Homepage
GauravBhabu
you were right
6 is the max amount of stars in use on my forum. So it quits at 6.
I thought a member could not get more then 5 stars because there are just 5 member levels.

thanks all for the explanation

If you think you can or you think you cannot, you are right. - Henry Ford
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07