Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RESTESTing too much money?
Author Message
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #1
RESTESTing too much money?
Hey everyone! Smile

Code:
ONBUTTON=1
IF (<SRC.RESTEST <TAG.itemvalue> i_gold>)
SRC.NEWITEM = <TAG.item>
SRC.ACT.BOUNCE
SRC.CONSUME <TAG.itemvalue>
...
...
ELSE
SRC.SYSMESSAGE You don't have enough gold.
ENDIF

TAG.itemvalue is always 5 million or more, it's random.
Problem is, I have 16 million on my bag and I still get "You don't have enough gold."

Am I RESTESTing for too much money?
What is the possible solution for this?

Thanks everyone!
09-24-2013 06:04 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: RESTESTing too much money?
You are using <tag.ItemValue> on a Dialog, wich is supposed that it was called from item: findid.i_item_with_tags.dialog d_your_dialog in wich Def is the item and src is yourself.

Maybe you can call the dialog on yourself and then search for that item with <tag.itemvalue> to retrieve that information.

If you show us how you call it we can help you more.
09-24-2013 06:24 PM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #3
RE: RESTESTing too much money?
Thanks for helping!

I call it through a speech.

Code:
ON=*buy*
DIALOG d_blabla

If I charge lower values, such as 5k or 50k, it works just fine.
The issue is with higher values only.. Tongue
09-24-2013 06:45 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: RESTESTing too much money?
PHP Code:
IF <SRC.GOLD> >= X
 BUY
ELSE
 
YOU DON'T HAVE MONEY.
ENDIF 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-24-2013 06:49 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: RESTESTing too much money?
The search function is your friend: http://forum.spherecommunity.net/Thread-...ayers-bank

[Image: 2nis46r.jpg]
09-24-2013 08:55 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #6
RE: RESTESTing too much money?
So try @Extreme's syntax ' if <src.gold>>=<tag.itemvalue>) ' (Note that this will search for gold in bank also)
09-24-2013 09:07 PM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #7
RE: RESTESTing too much money?
(09-24-2013 06:49 PM)Extreme Wrote:  
PHP Code:
IF <SRC.GOLD> >= X
 BUY
ELSE
 
YOU DON'T HAVE MONEY.
ENDIF 

Thanks!

(09-24-2013 08:55 PM)Mordaunt Wrote:  The search function is your friend: http://forum.spherecommunity.net/Thread-...ayers-bank

I'm really sorry.
I should have searched, but I'm used to my stupid mistakes, thought it was me failing again. >:

(09-24-2013 09:07 PM)XuN Wrote:  So try @Extreme's syntax ' if <src.gold>>=<tag.itemvalue>) ' (Note that this will search for gold in bank also)

Thank you too! Really helpful!
09-24-2013 11:59 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)