[2.3] Values

mighty3

LOMCN Veteran
Veteran
Oct 2, 2008
593
11
105
grantham
hi doing a npc and i come a bit stuck and confused

i dont understand why

when i put this

[@buy1]
#ACT
LoadValue A1 "House.txt" House1 Global
#IF
CHECKCALC %A1 == 0
CHECKGOLD 2500000
#ACT
CALC A1 + 1
SAVEVALUE A1 "House.txt" House1 Global %A1
TAKEGOLD 2500000
LOCALMESSAGE "WoW you got a house" Hint
#ELSEACT
LOCALMESSAGE "House already been bought" Hint
LOCALMESSAGE "Or you dont have the right amount of gold " Hint

it tells me House already been bought or gold

but when i do it like this

[@buy1]
#ACT
LoadValue A1 "House.txt" House1 Global
#IF
CHECKCALC %A1 == 1
CHECKGOLD 2500000
#ACT
CALC A1 - 1
SAVEVALUE A1 "House.txt" House1 Global %A1
TAKEGOLD 2500000
LOCALMESSAGE "WoW you got a house" Hint
#ELSEACT
LOCALMESSAGE "House already been bought" Hint
LOCALMESSAGE "Or you dont have the right amount of gold " Hint

it gives me the house and take me gold seem to back to front to me in a way or it ment to work like that
 
Last edited:

StormHero

Dedicated Member
Dedicated Member
Jan 19, 2015
924
2
281
105
In ur House.txt file, under house1 set it to say global = 0
Post automatically merged:

As unless u set it to say 0 at thr start, it just adds ones on so would go to global = 111111 n so on instead of adding it up
 
  • Like
Reactions: Far
Upvote 0

mighty3

LOMCN Veteran
Veteran
Oct 2, 2008
593
11
105
grantham
In ur House.txt file, under house1 set it to say global = 0
Post automatically merged:

As unless u set it to say 0 at thr start, it just adds ones on so would go to global = 111111 n so on instead of adding it up
Ok will have a play with it again when home
 
Upvote 0