Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: ItemMoney.Amount  (Read 3230 times)

0 Members and 1 Guest are viewing this topic.

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
ItemMoney.Amount
« on: June 11, 2006, 10:16:24 AM »

I want to make the counter of money.
The hero goes and collects coins, or distributes them.
What I do incorrectly?

if //////////hero take money
{
 (Game.TakeItem("penny"))
 AMOUNT = ItemMoney.Amount + 1
}
else ///////hero drop money 
{
 (Game.DropItem("penny"))
 AMOUNT = ItemMoney.Amount - 1

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: ItemMoney.Amount
« Reply #1 on: June 11, 2006, 12:21:55 PM »

What I do incorrectly?
Um... everything?

I don't really get your code. Something like this is more like it:

var MoneyItem = Game.GetItem("penny");
MoneyItem.Amount = MoneyItem.Amount + 1;

Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
Re: ItemMoney.Amount
« Reply #2 on: June 11, 2006, 02:39:36 PM »

What I do incorrectly?
Um... everything?

I so knew...)))

Thank.
 

Page created in 0.036 seconds with 19 queries.