Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to make exchanges with some restrictions on the steam user? #11

Open
devisaah opened this issue Dec 28, 2020 · 2 comments

Comments

@devisaah
Copy link

devisaah commented Dec 28, 2020

In tests performed by steam, the error is always given below, and when performing through the web interface, the sending of exchange proposal works, but it is being held back.

  • it is possible to send an example that is working, so that I can understand the operation of exchange using the gem.
def send_offer
     account  = Handler.new(************',**********') 
   

      his = account.normal_get_inventory('Skanby', 570)
      me = account.normal_get_inventory("76561199093280846", 570)

      myarray = [me[8]].compact!
      theirarray = [his[8]].compact!

      # whenever
      trade_url =  "https://steamcommunity.com/tradeoffer/new/?partner=112865394&token=fhoqG7oX"
      account.send_offer(myarray, theirarray, trade_url)
end 

Screenshot5

Screenshot

@OmG3r
Copy link
Owner

OmG3r commented Dec 29, 2020

As i have specified in the other issues, the nilClass error is because you are running .compact!, which will return nil if it does not make any modifications to the array

@devisaah
Copy link
Author

I removed the 'compact!', Now it is giving an error when sending the exchange, does the array of the item to be exchanged need to be treated before sending the exchange? because I'm sending the item as it comes in the normal_get_inventory method.

Screenshot 2020-12-29 215009

def send_offer
     account  = Handler.new(************',**********') 
   

      his = account.normal_get_inventory('Skanby', 570)
      me = account.normal_get_inventory("76561199093280846", 570)
       his_trade_url = account.normal_get_inventory("https://steamcommunity.com/tradeoffer/new/?partner=112865394&token=fhoqG7oX")

      myarray = [his_trade_url[1]]
      theirarray = [his_trade_url [1]]

      # whenever
      trade_url =  "https://steamcommunity.com/tradeoffer/new/?partner=112865394&token=fhoqG7oX"
      account.send_offer(myarray, theirarray, trade_url)
end 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants