| View previous topic :: View next topic |
| Author |
Message |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Wed Aug 06, 2008 12:19 pm Post subject: (Question - Visual basic) How to add values |
|
|
Hey, I'm trying to make a timer to add 1 every time it goes off, so like it would go 1 2 3 4 5 ect.
Each time I try and change it, it just adds whatever value I want it too, how would I make it so it adds 1 to that value each time?
Here's the code:
| Code: | | Label1.Caption = Val(1) + Val(1) |
So what would be the code? Thanks for answering if you answer.[/code] _________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Aug 06, 2008 12:24 pm Post subject: Re: (Question - Visual basic) How to add values |
|
|
| Hack-Addict wrote: | Hey, I'm trying to make a timer to add 1 every time it goes off, so like it would go 1 2 3 4 5 ect.
Each time I try and change it, it just adds whatever value I want it too, how would I make it so it adds 1 to that value each time?
Here's the code:
| Code: | | Label1.Caption = Val(1) + Val(1) |
So what would be the code? Thanks for answering if you answer.[/code] |
First off the Caption properties is a string, therefore you cant assign it an integer value. There is most likely a IntToStr function in VB. And you would add the current value with 1. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Wed Aug 06, 2008 12:29 pm Post subject: Re: (Question - Visual basic) How to add values |
|
|
| oib111 wrote: | | Hack-Addict wrote: | Hey, I'm trying to make a timer to add 1 every time it goes off, so like it would go 1 2 3 4 5 ect.
Each time I try and change it, it just adds whatever value I want it too, how would I make it so it adds 1 to that value each time?
Here's the code:
| Code: | | Label1.Caption = Val(1) + Val(1) |
So what would be the code? Thanks for answering if you answer.[/code] |
First off the Caption properties is a string, therefore you cant assign it an integer value. There is most likely a IntToStr function in VB. And you would add the current value with 1. |
Woohoo! Got it, and it was retarded easy... the code is
| Code: | | Label1 = val(label1.caption) + val(1) |
_________________
|
|
| Back to top |
|
 |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Thu Aug 07, 2008 6:46 pm Post subject: Re: (Question - Visual basic) How to add values |
|
|
| Hack-Addict wrote: | | oib111 wrote: | | Hack-Addict wrote: | Hey, I'm trying to make a timer to add 1 every time it goes off, so like it would go 1 2 3 4 5 ect.
Each time I try and change it, it just adds whatever value I want it too, how would I make it so it adds 1 to that value each time?
Here's the code:
| Code: | | Label1.Caption = Val(1) + Val(1) |
So what would be the code? Thanks for answering if you answer.[/code] |
First off the Caption properties is a string, therefore you cant assign it an integer value. There is most likely a IntToStr function in VB. And you would add the current value with 1. |
Woohoo! Got it, and it was retarded easy... the code is
| Code: | | Label1 = val(label1.caption) + val(1) |
|
val(1) == 1
in english, the value of 1 is 1 _________________
Get kidnapped often. |
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Aug 07, 2008 8:37 pm Post subject: |
|
|
| What are you trying to do? I didn't understand. |
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Fri Aug 08, 2008 5:31 am Post subject: |
|
|
| dnsi0 wrote: | | What are you trying to do? I didn't understand. |
He's using a timer and for every tick he wants to add 1 to the caption thing.
and stop fucking bumping this.. _________________
Intel over amd yes. |
|
| Back to top |
|
 |
|