Author Topic: WSV MONEY SCRIPT ERROR  (Read 13181 times)

0 Members and 1 Guest are viewing this topic.

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
WSV MONEY SCRIPT ERROR
« on: October 16, 2008, 08:30:49 pm »
Please help :- got


Quote
   elseif (withdraw* iswm $3) {
      WSV.cmdlevelcheck $1-
      if (%bankname isin $WSV.loco($2)) {
        if ($4 <= $WSV.bank($2)) || ($4 == all) {
          if ($4 == all) var %money = $hget(WSV.Bank,$WSV.getname($2))
          if ($4 <= $WSV.money($2)) var %money = $4
          hinc WSV.money $WSV.name($2) $4
          hdec WSV.bank $WSV.name($2) $4
          WSV.setcash $2 $hget(WSV.money,$WSV.getname($2))
          WSV.msg $2 You have been withdrawed $chr(91) $ $+ $4 $chr(93) from your bank account!
          WSV.msg $2 New Balance: $chr(91) $ $+ $WSV.bank($2) $chr(93)
        }
        else WSV.msg $2 You hasn't got $chr(91) $ $+ $4 $chr(93) in you're bank account!
      }
      else WSV.msg $2 You have to be at the bank!
    }

THIS SCRIPT by windlord i m having a Problem like if i try anything to buy it says u dont have enough cash like i wanna get healed or when i buy even a car Still i dont know why it gives error Saying you need 200$ but i have 9000$ :( something is error in this script the HEAL CMD i used is this one not made by me :- its made by someone in Forum



Quote
   elseif (aspirine == $3) {
      WSV.cmdlevelcheck $1-
      if (downtown isin $WSV.loco($2)) {
       if ($WSV.money >= 500) {
          hdec WSV.money $WSV.name($2) 500
          WSV.setcash $2 $WSV.money($3)
          WSV.sethealth $2 100
          WSV.announce $2 You are healed by the doctors of the hospital.
        }
        else WSV.msg $2 You need at least 500
      }
      else WSV.msg $2 You need to be Hospital.
    }

:( i have 9000$ it says u dont have 2000$ :( whats the error
Founder of [SAF]Clan

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: WSV MONEY SCRIPT ERROR
« Reply #1 on: October 16, 2008, 09:06:24 pm »
Eeh, its not a Error from the heal script i think because nowere in that script does it says u dont have 2000$, It only says You need at least 500.
But maby u said something wrong :D
Anyways this should work fine:
Quote
   elseif (aspirine == $3) {
      WSV.cmdlevelcheck $1-
      if (downtown isin $WSV.loco($2)) {
       if ($WSV.money($2) >= 500) {
          hdec WSV.money $WSV.name($2) 500
          WSV.setcash $2 $WSV.money($2)
          WSV.sethealth $2 100
          WSV.announce $2 You are healed by the doctors of the hospital.
        }
        else WSV.msg $2 You need at least 500
      }
      else WSV.msg $2 You need to be Hospital.
    }

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
Re: WSV MONEY SCRIPT ERROR
« Reply #2 on: October 17, 2008, 12:34:25 pm »
I know that there is a Problem IN This script :-

Quote
   elseif (withdraw* iswm $3) {
      WSV.cmdlevelcheck $1-
      if (%bankname isin $WSV.loco($2)) {
        if ($4 <= $WSV.bank($2)) || ($4 == all) {
          if ($4 == all) var %money = $hget(WSV.Bank,$WSV.getname($2))
          if ($4 <= $WSV.money($2)) var %money = $4
          hinc WSV.money $WSV.name($2) $4
          hdec WSV.bank $WSV.name($2) $4
          WSV.setcash $2 $hget(WSV.money,$WSV.getname($2))
          WSV.msg $2 You have been withdrawed $chr(91) $ $+ $4 $chr(93) from your bank account!
          WSV.msg $2 New Balance: $chr(91) $ $+ $WSV.bank($2) $chr(93)
        }
        else WSV.msg $2 You hasn't got $chr(91) $ $+ $4 $chr(93) in you're bank account!
      }
      else WSV.msg $2 You have to be at the bank!
    }

Because like i have license and heal cmd i cant BUY BOTH! it says same error u dont have Enough money.
« Last Edit: October 17, 2008, 12:38:48 pm by gamyster »
Founder of [SAF]Clan

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: WSV MONEY SCRIPT ERROR
« Reply #3 on: October 17, 2008, 12:44:31 pm »
mmm, i donnu :-\

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
Re: WSV MONEY SCRIPT ERROR
« Reply #4 on: October 17, 2008, 12:45:32 pm »
:p NVM I FIXED IT!.
Founder of [SAF]Clan

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: WSV MONEY SCRIPT ERROR
« Reply #5 on: October 17, 2008, 12:48:38 pm »
Hey quake there is no problem in !withdraw or !deposit ,there is a problem in heal and license command try to find it yourself there is a minor mistake and thijn had replied a right heal command ....and u have seen in my server that heal command is working fine thats the clue now try to find it yourself.. ;)

Cya
Punjabi_goli
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
Re: WSV MONEY SCRIPT ERROR
« Reply #6 on: October 17, 2008, 01:03:48 pm »
Hey is $WSV.money($2) is same like WSV.money $2  ??
Founder of [SAF]Clan

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: WSV MONEY SCRIPT ERROR
« Reply #7 on: October 17, 2008, 03:51:33 pm »
The heal command only works, if you are at your property (owned property)
$WSV.money($2) --> it is a command shows how much money  you have, ($2 means you.)

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: WSV MONEY SCRIPT ERROR
« Reply #8 on: October 17, 2008, 03:57:03 pm »
The heal command only works, if you are at your property (owned property)
$WSV.money($2) --> it is a command shows how much money  you have, ($2 means you.)

so there is no possibility to heal like LW, i.e healing at all hospitals and medic stores?

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: WSV MONEY SCRIPT ERROR
« Reply #9 on: October 17, 2008, 04:15:58 pm »
It is possible, just you have to make another command for hospital heals.

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: WSV MONEY SCRIPT ERROR
« Reply #10 on: October 17, 2008, 04:30:56 pm »
It is possible, just you have to make another command for hospital heals.

uhm .. can u provide one, where members should be able to heal at all hospitals and medic store?

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: WSV MONEY SCRIPT ERROR
« Reply #11 on: October 17, 2008, 05:15:31 pm »
maby something like:
Code: [Select]
   elseif (heal == $3) {
      WSV.cmdlevelcheck $1-
      if (hosp isin $WSV.loco($2)) || (medic isin $WSV.loco($2)) {
       if ($WSV.money($2) >= 500) {
          hdec WSV.money $WSV.name($2) 500
          WSV.setcash $2 $WSV.money($2)
          WSV.sethealth $2 100
          WSV.announce $2 You are healed by the doctors of the hospital.
        }
        else WSV.msg $2 You need at least 500
      }
      else WSV.msg $2 You need to be Hospital or at a Medic Store.
    }
Think that should work only if the Areas are good, So the Hospital has Hosp in his name, and the Medic Store has medic in his name ;)

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: WSV MONEY SCRIPT ERROR
« Reply #12 on: October 17, 2008, 07:29:57 pm »

Think that should work only if the Areas are good, So the Hospital has Hosp in his name, and the Medic Store has medic in his name ;)

thnkx thijn, any specific place to inject this code?

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: WSV MONEY SCRIPT ERROR
« Reply #13 on: October 17, 2008, 08:26:46 pm »
Just add it were the other cmds are i think :D ;)

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: WSV MONEY SCRIPT ERROR
« Reply #14 on: October 17, 2008, 10:50:50 pm »
Yes, and u can set the same name for all hospitals.