Current location: Hot Scripts Forums » Programming Languages » ASP » VBscript... math functions and stuff that hurts my brain.


VBscript... math functions and stuff that hurts my brain.

Reply
  #1 (permalink)  
Old 08-31-03, 02:04 PM
Mister B.'s Avatar
Mister B. Mister B. is offline
Wannabe Coder
 
Join Date: Jul 2003
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
VBscript... math functions and stuff that hurts my brain.

In my forum, I have a problem, when displaying the subject, sometimes it breaks the table, by making itself two lines long. This occurs when someone either has a long username or a long subject, so what I am doing, is making a script, which first looks and finds out wheather, the pname, and the puser variables together add up to more than 30. if so then we have to do somehting, else just display it. so then I say display this much of "pname" from the lefthand side. here is where the trouble comes in. when I tell it how much of pname to display. I use the code here ", (33-len(RS("pname")))))%>" so what I say is 33 minus the length of the variable pname. Now the error is in the sintax, how do I fix it? the whole code is below, along with the error.
'Code
<%if (len(RS("pname")&RS("puser")) > 30)Then%><%=(Left (RS("pname"), (33-len(RS("pname")))))%>...<%else%> <%=RS("pname")%><%end if%>
'Error

Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument: 'Left'

/cubularrpg/vforum.asp, line 48

Thanks in advance.
__________________
God save us from the religious fanatics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 01:19 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.