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.