Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:12:47+00:00 2026-05-29T21:12:47+00:00

I am experiencing difficulty with the following VBS code. It works only sometimes, and

  • 0

I am experiencing difficulty with the following VBS code. It works only sometimes, and even then it fails quickly. Why?

Dim Butt
Set Butt = CreateObject("InternetExplorer.application")
Butt.visible = True
Butt2 = InputBox("Put the link to one hat you would like to snipe.", "Hat Selection")
Butt3 = InputBox("Enter the maximum amount of Robux you will spend on this hat.", "Maximum Payment")
Dim Proace
Set Proace = CreateObject("Microsoft.XMLHTTP")
Proace.Open "GET", "http://www.roblox.com", False
Proace.Send
Do
Do While Butt.Busy
WScript.sleep 200
Loop
St00f = CInt(Replace(Mid(St00f, (InStr(St00f, ">R$")+3), 8), "</b>", ""))
If St00f <= CInt(Butt3) Then
Butt.Navigate "javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions(""ctl00$cphRoblox$TabbedInfo$UserSalesTab$lstItemsForResale$ctrl0$lnkBuyNow"",%20"""",%20true,%20"""",%20"""",%20false,%20true))"
Exit Do
End If
Loop
Do While Butt.Busy
WScript.sleep 200
Loop
MsgBox("Congratulations! Your snipe was successful! You sniped "&Butt2&" for "&Butt3&" Robux!")
Butt.Quit
Set Butt = Nothing
Set Proace = Nothing
WScript.Quit

Error:

Script:   C:\Users\John\Downloads\SingleHatSniper.vbs  
Line:     14
Char:     1
Error:    Type mismatch: 'CInt'
Code:     800A000D
Source:   Microsoft VBScript runtime error

Please help me, I’m not that great with VBS. That much is clear, my friend helped me write this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:12:49+00:00Added an answer on May 29, 2026 at 9:12 pm

    As you might have known by now, this is where the error occurs

    St00f = CInt(Replace(Mid(St00f, (InStr(St00f, ">R$")+3), 8), "</b>", ""))
    

    And that line does these things

    1. InStr that returns the numeric position of the first occurrence of “>R$”
    2. Its then added with 3 to get the index after the string"R$"
    3. Now Mid splits the string St00f with start index after "R$" to a length of 8
    4. Then Replace takes the split string and replaces an occurrence of "</b>" with ""
    5. At last CInt converts the string to an integer or more correctly * converts any number to the variant of subtype Integer*

    And you are getting the error at the CInt conversion.

    If I were at your place, I will split this line by line by keeping only one function per line and then try something like MsgBox for the output after each line and find what’s wrong with that.

    The key is the variable St00f and what that variable holds.
    Happy Coding 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm experiencing a difficulty in rendering sfWidgetFormDoctrineChoice (set of checkboxes) widget for a NestedSet
Is there something wrong with the following HTML, or am I simply experiencing a
I'm a starting C# programmer and I'm experiencing the following problem. I've created a
I'm experiencing a lot of difficulty getting Semaphores to work on a Linux based
Im experiencing strange behavior when converting String to DateTime and then again ToString(). Convert.ToDateTime(16-02-2012).ToString(MM/dd/yyyy)
I am experiencing some difficulty getting a companies web service test-suite environment up and
I am trying to use OpenBabel and am experiencing great difficulty with setting up
I am experiencing and issue only in IE. In FF, Safari, and Chrome, behavior
Experiencing jquery in rails through .js.erb templates; but completely puzzled by a simple problem
After experiencing numerous problems with a certain media player, it got me thinking is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.