Author |
Topic |
|
Chris Yew
Junior Member
134 Posts |
Posted - 29 December 2002 : 07:10:20
|
Hi,
Just installed the My Avatar Addon - for Avatar Mod 3.4.0.3 v1.1. My Snitz forum is Ver.3.4.03.
At the Admin Option, when I click the My Avatars List Show, it displays the following error; "Microsoft VBScript runtime error '800a000d' Type mismatch: 'getStarColor'
/forum/my_avatar_show.asp, line 399"
Here is my-avatar_show.asp from line from 385 to 402;
'## get member's star/posts level dim ShowTitle, ShowStar ShowTitle = ChkString(getMember_Level(Members_MemberTitle, Members_MemberLevel, Members_MemberPosts),"display") select case Int(Members_MemberLevel) case 1 if (Members_MemberPosts < cLng(intRankLevel1)) then ShowStar = "" if (Members_MemberPosts >= cLng(intRankLevel1)) and (Members_MemberPosts < cLng(intRankLevel2)) then ShowStar = getCurrentIcon(getStarColor(strRankColor1),ShowTitle,"") if (Members_MemberPosts >= cLng(intRankLevel2)) and (Members_MemberPosts < cLng(intRankLevel3)) then ShowStar = getCurrentIcon(getStarColor(strRankColor2),ShowTitle,"") if (Members_MemberPosts >= cLng(intRankLevel3)) and (Members_MemberPosts < cLng(intRankLevel4)) then ShowStar = getCurrentIcon(getStarColor(strRankColor3),ShowTitle,"") if (Members_MemberPosts >= cLng(intRankLevel4)) and (Members_MemberPosts < cLng(intRankLevel5)) then ShowStar = getCurrentIcon(getStarColor(strRankColor4),ShowTitle,"") if (Members_MemberPosts >= cLng(intRankLevel5)) then ShowStar = getCurrentIcon(getStarColor(strRankColor5),"","") case 2 ShowStar = getCurrentIcon(getStarColor(strRankColorMod),ShowTitle,"") case 3 ShowStar = getCurrentIcon(getStarColor(strRankColorAdmin),ShowTitle,"") case else ShowStar = "" end select
Thank you. Chris Yew
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 29 December 2002 : 08:52:52
|
hi~ Chris, not sure why get this strange problem... but the function getStarColor is in inc_func_member.asp
function getStarColor(strStarColor)
select case strStarColor
case "gold" : getStarColor = strIconStarGold
case "silver" : getStarColor = strIconStarSilver
case "bronze" : getStarColor = strIconStarBronze
case "orange" : getStarColor = strIconStarOrange
case "red" : getStarColor = strIconStarRed
case "purple" : getStarColor = strIconStarPurple
case "blue" : getStarColor = strIconStarBlue
case "cyan" : getStarColor = strIconStarCyan
case "green" : getStarColor = strIconStarGreen
end select
end function
and you can see, it just a simple transformation.. if you setup the Admin star color "red", then getStarColor=strIconStarRed, and by the GetCurrentIcon to output the star icon.
can't think about why this easy work will get problem... have you changed something to the Star Color except from the Admin Option/Ranking Configuration ??? |
|
|
Chris Yew
Junior Member
134 Posts |
Posted - 29 December 2002 : 10:40:55
|
Hi DoraMoon,
Guess there's some changes in my inc_func_member.asp. Here's part of it which I think it's different from yours;
function getStar_Level(fM_LEVEL, fM_POSTS) dim Star_Level
select case fM_LEVEL case "1" if (fM_POSTS < cLng(intRankLevel1)) then Star_Level = "" if (fM_POSTS >= cLng(intRankLevel1)) and (fM_POSTS < cLng(intRankLevel2)) then Star_Level = getCurrentIcon("icon_star_" & strRankColor1 & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel2)) and (fM_POSTS < cLng(intRankLevel3)) then Star_Level = getCurrentIcon("icon_star_" & strRankColor2 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor2 & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel3)) and (fM_POSTS < cLng(intRankLevel4)) then Star_Level = getCurrentIcon("icon_star_" & strRankColor3 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor3 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor3 & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel4)) and (fM_POSTS < cLng(intRankLevel5)) then Star_Level = getCurrentIcon("icon_star_" & strRankColor4 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor4 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor4 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor4 & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel5)) then Star_Level = getCurrentIcon("icon_star_" & strRankColor5 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor5 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor5 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor5 & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColor5 & ".gif|13|12","","") case "2" if fM_POSTS < cLng(intRankLevel1) then Star_Level = "" if (fM_POSTS >= cLng(intRankLevel1)) and (fM_POSTS < cLng(intRankLevel2)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel2)) and (fM_POSTS < cLng(intRankLevel3)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel3)) and (fM_POSTS < cLng(intRankLevel4)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel4)) and (fM_POSTS < cLng(intRankLevel5)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel5)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorMod & ".gif|13|12","","") case "3" if (fM_POSTS < cLng(intRankLevel1)) then Star_Level = "" if (fM_POSTS >= cLng(intRankLevel1)) and (fM_POSTS < cLng(intRankLevel2)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel2)) and (fM_POSTS < cLng(intRankLevel3)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel3)) and (fM_POSTS < cLng(intRankLevel4)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel4)) and (fM_POSTS < cLng(intRankLevel5)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") if (fM_POSTS >= cLng(intRankLevel5)) then Star_Level = getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","") & getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","")
case else Star_Level = "Error" end select
getStar_Level = Star_Level end function
I can't remember what I've done to them. Anyway that you may help?
Thank you.
Chris Yew
|
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 29 December 2002 : 11:23:07
|
hi~ Chris, yes, your getStar_Level function really look a little different...
getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","")
in original 3.4 code, it should be like this.. getCurrentIcon(getStarColor(strRankColorAdmin),"","")
i do'nt know which mod will need to do this modification, but i think maybe you can check this function getStarColor again. i doubt that maybe it already gone from your inc_fun_member.asp
if so, maybe you'll consider put it back from a original inc_func_member.asp file.(just like above my posts.) otherwise, you'll need to do the same change to the my_avatar_show.asp file(or other files use this function,,). for example: change this getCurrentIcon(getStarColor(strRankAdmin),"","") to this getCurrentIcon("icon_star_" & strRankColorAdmin & ".gif|13|12","","")
but no suggest you do that, because the function getStarColor is a original snitz code, maybe other mods still will use it in future. so maybe just put it back will be better way. |
|
|
Chris Yew
Junior Member
134 Posts |
Posted - 29 December 2002 : 19:57:51
|
Hi DoraMoon,
Thanks very much for the info. Will work that out soon.
Chris Yew
|
|
|
|
Topic |
|
|
|