Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Free User sylomex's Avatar
    Join Date
    Dec 2013
    Location
    France
    Posts
    369
    Reputation
    39
    Rep Power
    21

    Using Stake Action

    Im using this action into a persistent :


    stake = getuseroption("Stake")
    auto(800, 1000)
    if stake == true and maround(6) == 0 then
    stake(6)
    end


    and i got this error, i dont know why :

    error in Persistent script Stake:
    ["stake(6)"]:Stake:5 attempt to call global 'stake' (a boolean value)
    Any idea ?

    Thanks everyone !

  2. #2
    Banned
    Join Date
    Dec 2013
    Location
    Barcelona
    Posts
    924
    Reputation
    22
    Rep Power
    0
    auto(1000)
    if (maround(7,false) == 0 and $lootbodies == 0)
    then
    wait(50,100)
    stake(7,false)
    end


    Try this bro!

  3. #3
    Wind Powered
    Join Date
    Dec 2013
    Location
    dvscripts.com
    Posts
    7,105
    Reputation
    433
    Rep Power
    39
    it will stake even if not market


    local stake = getuseroption("Stake")
    auto(800, 1000)
    if stake == true and maround(6) == 0 then
    stake(6)
    end


    i think it should work, you should put local before stake

  4. #4
    Free User sylomex's Avatar
    Join Date
    Dec 2013
    Location
    France
    Posts
    369
    Reputation
    39
    Rep Power
    21
    adding local before my getuseroption didnt change anything in my error.

    And Ketamyn I got the same error using your action too.

    Probably something comming from the software and not for the script.

  5. #5
    Banned
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    242
    Reputation
    14
    Rep Power
    0
    Try:

    PHP Code:
    local Stake getuseroption('Stake') if (Stake == true) and maround(6) == 0 then

     stake
    (6)
     
    end 

  6. #6
    Free User Harvey's Avatar
    Join Date
    Dec 2013
    Location
    Philippines
    Posts
    2,407
    Reputation
    15
    Rep Power
    25
    19:53:09 error in Cavebot script stake:
    ["stake(7, true, true)"]:stake:8 attempt to call local 'stake' (a boolean value)

    same probably bugged? it worked previous version

  7. #7
    Free User sylomex's Avatar
    Join Date
    Dec 2013
    Location
    France
    Posts
    369
    Reputation
    39
    Rep Power
    21
    ill report it to Lucas then.

    Thanks everyone for your help !

  8. #8
    Free User
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    117
    Reputation
    15
    Rep Power
    21
    It's not a problem with the bot. "stake" is a boolean, not a function.

    You should always use local variables if you are not planning to use them outside of their scope, although it wont really change the functionality of the script (with exceptions).
    Regards,
    Colandus

  9. #9
    Free User Harvey's Avatar
    Join Date
    Dec 2013
    Location
    Philippines
    Posts
    2,407
    Reputation
    15
    Rep Power
    25
    Quote Originally Posted by Colandus View Post
    It's not a problem with the bot. "stake" is a boolean, not a function.

    You should always use local variables if you are not planning to use them outside of their scope, although it wont really change the functionality of the script (with exceptions).
    I tried using local, no local try to test it

  10. #10
    Administrator Lucas Terra's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    2,202
    Reputation
    141
    Rep Power
    10
    Your mistake was that you overwrote the stake function with the boolean value of getuseroption('Stake').


    Try this:
    auto(800, 1000)

    local shouldusestake = getuseroption('Stake')

    if shouldusestake and $lootsaround == 0 and $targetingtarget.id == 0 and stakespots(7) > 0 then
    pausewalking(10000)
    stake(7)
    pausewalking(0)
    end

 

 

Posting Permissions

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