Jump to content
  • Advertisement
Sign in to follow this  
Webbie27

How do I go about starting my idea?

This topic is 2131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ObtCash = 5
ObtRocks = 1

If RocksHeld >= ObtRocks Then
	CashHeld = CashHeld + ObtCash
	RocksHeld = RocksHeld - ObtRocks
	lblROCKS.Text = +CStr(RocksHeld)
	lblCASH.Text = +Cstr(CashHeld)
End If

Something like that? (Edited with improved answer)

 

This would replace all the stuff in your btnSELL_Click function.

 

 

That is perfect my man! Thank you very much. Looking at it I see how that makes sense haha, cheers!

Share this post


Link to post
Share on other sites
Advertisement

I noticed that your "btnMINE Click" variable did not have an underscore, as opposed to your "btnSELL_Click". Thought I'd just mention it.

I think that's just an artifact in the posted screenshot. Several horizontal lines seem to just be missing (several equals signs look like minus signs, and some letters have parts missing, for example).

Share this post


Link to post
Share on other sites

 

I noticed that your "btnMINE Click" variable did not have an underscore, as opposed to your "btnSELL_Click". Thought I'd just mention it.

I think that's just an artifact in the posted screenshot. Several horizontal lines seem to just be missing (several equals signs look like minus signs, and some letters have parts missing, for example).

 


Most Likely the reason, I checked it and it is there, anyway, new situation now. It's probably simple to you guys! But my idea now is that once an item has been purchased, the button hides, so that it cannot be purchased again.

Any techniques to this? My current idea doesn't seem to be working haha.

If UPG1 = True Then
            btnBuyUPG1.Hide = True
        End If

UPG1 is a Boolean statement of whether the Upgrade has been purchased.
btnBuyUPG1 is the Button to purchase said upgrade. 

 

The error I get is:

Error 1 Expression is a value and therefore cannot be the target of an assignment.
 
Edited by Webbie27

Share this post


Link to post
Share on other sites

If UPG1 == True?

I don't know the language syntax, but double equals is very often used for equality checks, while single equals is used for assignment.

Share this post


Link to post
Share on other sites

If UPG1 == True?

I don't know the language syntax, but double equals is very often used for equality checks, while single equals is used for assignment.

Unfortunately this didn't work, it's saying the error itself is with the btnBuyUPG1.Hide statement.

Share this post


Link to post
Share on other sites

Some quick googling seems to indicate that Hide is a function, and Visible is the variable.

So possibly btnBuyUPG1.Hide() or btnBuyUPG1.Visible = false

Share this post


Link to post
Share on other sites

Well this is weird, I tried the Visible function earlier and it didn't work, however now it is, strange, must of had a syntax error somewhere, but it works fine now thank you! I am slowly but surely making progress and it feels great!

Once I've added in a few more upgrades to flesh it out, I need to add in a per second mining/selling system, then upgrades for that. 

Edited by Webbie27

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!