How do I go about starting my idea?

Started by
16 comments, last by Webbie27 10 years, 6 months ago

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!

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.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -

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).

Hello to all my stalkers.

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.

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.

Hello to all my stalkers.

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.

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

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

Hello to all my stalkers.

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.

This topic is closed to new replies.

Advertisement