Subs again - please help

Results 1 to 3 of 3

Thread: Subs again - please help

  1. #1
    Conn Guest

    Default Subs again - please help

    Error de compilación de Microsoft VBScript error &#039 800a0414&#039 <BR><BR>No se puede utilizar paréntesis al llamar a Sub <BR><BR>/default.asp, line 32 <BR><BR>SetVariable("FullUserID", getUserID)<BR>------------------------------------^<BR><BR>sub SetVariable(strVariableName, varVariableValue)<BR> &#039Document.Cookie = strVariableName & "=" & varVariableValue<BR> response.write "Setting variable "&strVariableName&"="&varVariablevalue<BR> Response.Cookies(strVariableName) = varVariableValue<BR> response.write "Testing "&(Request.Cookies(strVariableName) )<BR> End Sub<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    41

    Default RE: Subs again - please help

    Although I don&#039t understand the error message. I believe it says that you can&#039t use parens when calling subs. So just remove the parens from the call to your subroutine.<BR> like this:<BR> SetVariable "FullUserID", getUserID<BR>You would use the parens when calling functions that return some value.<BR>

  3. #3
    Jason Miller Guest

    Default RE: Subs again - please help

    function SetVariable(strVariableName, varVariableValue)<BR>&#039Document.Cookie = strVariableName & "=" & varVariableValue<BR>response.write "Setting variable "&strVariableName&"="&varVariablevalue<BR>Response .Cookies(strVariableName) = varVariableValue<BR>response.write "Testing "&(Request.Cookies(strVariableName) )<BR>End function<BR><BR>...<BR>call setVariable("abc", 5)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •