Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[HELP] My code doesnt work :S HELP QUICK!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Tue Aug 19, 2008 1:36 pm    Post subject: [HELP] My code doesnt work :S HELP QUICK! Reply with quote

Hi, im making a webbrowser, i have problems with bookmarks, heres the code:

Add bookmark Button
Code:

 If Form1.btnBook1.Visible = False Then
            My.Settings.book1 = txtBookName.Text
            My.Settings.book1address = txtBookaddress.Text
            Form1.btnBook1.Visible = True
            Form1.btnBook1.Text = My.Settings.book1
            My.Settings.Save()
        ElseIf Form1.btnBook2.Visible = False Then
            My.Settings.book2 = txtBookName.Text
            My.Settings.book2address = txtBookaddress.Text
            Form1.btnBook2.Visible = True
            Form1.btnBook2.Text = My.Settings.book2
            My.Settings.Save()
        ElseIf Form1.btnBook3.Visible = False Then
            My.Settings.book3 = txtBookName.Text
            My.Settings.book3address = txtBookaddress.Text
            Form1.btnBook3.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook4.Visible = False Then
            My.Settings.book4 = txtBookName.Text
            My.Settings.book4address = txtBookaddress.Text
            Form1.btnBook4.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook5.Visible = False Then
            My.Settings.book5 = txtBookName.Text
            My.Settings.book5address = txtBookaddress.Text
            Form1.btnBook5.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook6.Visible = False Then
            My.Settings.book6 = txtBookName.Text
            My.Settings.book6address = txtBookaddress.Text
            Form1.btnBook6.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook7.Visible = False Then
            My.Settings.book7 = txtBookName.Text
            My.Settings.book7address = txtBookaddress.Text
            Form1.btnBook7.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook8.Visible = False Then
            My.Settings.book8 = txtBookName.Text
            My.Settings.book8address = txtBookaddress.Text
            Form1.btnBook8.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook9.Visible = False Then
            My.Settings.book9 = txtBookName.Text
            My.Settings.book9address = txtBookaddress.Text
            Form1.btnBook9.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook10.Visible = False Then
            My.Settings.book10 = txtBookName.Text
            My.Settings.book10address = txtBookaddress.Text
            Form1.btnBook10.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook11.Visible = False Then
            My.Settings.book11 = txtBookName.Text
            My.Settings.book11address = txtBookaddress.Text
            Form1.btnBook11.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook12.Visible = False Then
            My.Settings.book12 = txtBookName.Text
            My.Settings.book12address = txtBookaddress.Text
            Form1.btnBook12.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook13.Visible = False Then
            My.Settings.book13 = txtBookName.Text
            My.Settings.book13address = txtBookaddress.Text
            Form1.btnBook13.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook14.Visible = False Then
            My.Settings.book14 = txtBookName.Text
            My.Settings.book14address = txtBookaddress.Text
            Form1.btnBook14.Visible = True
            My.Settings.Save()
        End If


Is something wrong? cuz when i add 1bookmark to it it works, but when i add a second bookmark it replaces the first one :S

PLease help fast !
Back to top
View user's profile Send private message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Tue Aug 19, 2008 1:57 pm    Post subject: Reply with quote

Code:
 If Form1.btnBook1.Visible = False Then
            My.Settings.book1 = txtBookName.Text
            My.Settings.book1address = txtBookaddress.Text
            Form1.btnBook1.Visible = True
            Form1.btnBook1.Text = My.Settings.book1
            My.Settings.Save()
        ElseIf Form1.btnBook2.Visible = False Then
            My.Settings.book2 = txtBookName.Text
            My.Settings.book2address = txtBookaddress.Text
            Form1.btnBook2.Visible = True
            Form1.btnBook2.Text = My.Settings.book2
            My.Settings.Save()
        ElseIf Form1.btnBook3.Visible = False Then
            My.Settings.book3 = txtBookName.Text
            My.Settings.book3address = txtBookaddress.Text
            Form1.btnBook3.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook4.Visible = False Then
            My.Settings.book4 = txtBookName.Text
            My.Settings.book4address = txtBookaddress.Text
            Form1.btnBook4.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook5.Visible = False Then
            My.Settings.book5 = txtBookName.Text
            My.Settings.book5address = txtBookaddress.Text
            Form1.btnBook5.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook6.Visible = False Then
            My.Settings.book6 = txtBookName.Text
            My.Settings.book6address = txtBookaddress.Text
            Form1.btnBook6.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook7.Visible = False Then
            My.Settings.book7 = txtBookName.Text
            My.Settings.book7address = txtBookaddress.Text
            Form1.btnBook7.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook8.Visible = False Then
            My.Settings.book8 = txtBookName.Text
            My.Settings.book8address = txtBookaddress.Text
            Form1.btnBook8.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook9.Visible = False Then
            My.Settings.book9 = txtBookName.Text
            My.Settings.book9address = txtBookaddress.Text
            Form1.btnBook9.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook10.Visible = False Then
            My.Settings.book10 = txtBookName.Text
            My.Settings.book10address = txtBookaddress.Text
            Form1.btnBook10.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook11.Visible = False Then
            My.Settings.book11 = txtBookName.Text
            My.Settings.book11address = txtBookaddress.Text
            Form1.btnBook11.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook12.Visible = False Then
            My.Settings.book12 = txtBookName.Text
            My.Settings.book12address = txtBookaddress.Text
            Form1.btnBook12.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook13.Visible = False Then
            My.Settings.book13 = txtBookName.Text
            My.Settings.book13address = txtBookaddress.Text
            Form1.btnBook13.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook14.Visible = False Then
            My.Settings.book14 = txtBookName.Text
            My.Settings.book14address = txtBookaddress.Text
            Form1.btnBook14.Visible = True
            My.Settings.Save()
        End If

i see that u use txtbookaddress.text in every if statement and if u released the source code we can help u cuz i dont know whats what
it's kinda impossible to find the wrong code if we dont even know what thing is what so releasing the source code will be kinda needed to help

but just looking at this i think u need to switch
Code:
            My.Settings.book10 = txtBookName.Text
            My.Settings.book10address = txtBookaddress.Text
to
Code:
           txtBookName.Text = My.Settings.book10
           txtBookaddress.Text =  My.Settings.book10address

_________________
Brillia wrote:
I FUCKING FUCK SEX
Back to top
View user's profile Send private message Send e-mail
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Tue Aug 19, 2008 2:01 pm    Post subject: Reply with quote

fafaffy, i give you the source code in a momment, !
Back to top
View user's profile Send private message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Tue Aug 19, 2008 3:13 pm    Post subject: Reply with quote

SwedenS wrote:
fafaffy, i give you the source code in a momment, !

if im not mistaken the reason it over writes is because look
Code:

        ElseIf Form1.btnBook6.Visible = False Then
            My.Settings.book6 = txtBookName.Text
            My.Settings.book6address = txtBookaddress.Text
            Form1.btnBook6.Visible = True
            My.Settings.Save()
        ElseIf Form1.btnBook7.Visible = False Then
            My.Settings.book7 = txtBookName.Text
            My.Settings.book7address = txtBookaddress.Text
            Form1.btnBook7.Visible = True
            My.Settings.Save()

now thats the code look at this part though
Code:

        ElseIf Form1.btnBook6.Visible = False Then
            My.Settings.book6 = txtBookName.Text
            My.Settings.book6address = txtBookaddress.Text
        ElseIf Form1.btnBook7.Visible = False Then
            My.Settings.book7 = txtBookName.Text
            My.Settings.book7address = txtBookaddress.Text

do you notice something funny?, well look they both get data from the same place bookmark1's title + address is gotten from txtBookName.text & txtBookadress

but if u look at the second one it gets it from the same data. this shouldnt happen else if the first one gave the text to the text box the second one will over write it, therefore losing the data u need to declare a new txtBookName for every one else they will over write each other.

Nvm why wont u use registries to get data and stuff

_________________
Brillia wrote:
I FUCKING FUCK SEX
Back to top
View user's profile Send private message Send e-mail
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Tue Aug 19, 2008 3:32 pm    Post subject: Reply with quote

Thanks fafaffy, i didnt notice i made that mistake, anyway, ill try to fix it Razz

Did u download the source ?
Back to top
View user's profile Send private message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Tue Aug 19, 2008 3:35 pm    Post subject: Reply with quote

SwedenS wrote:
Thanks fafaffy, i didnt notice i made that mistake, anyway, ill try to fix it Razz

Did u download the source ?


yea

_________________
Brillia wrote:
I FUCKING FUCK SEX
Back to top
View user's profile Send private message Send e-mail
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Tue Aug 19, 2008 3:37 pm    Post subject: Reply with quote

fafaffy wrote:
SwedenS wrote:
Thanks fafaffy, i didnt notice i made that mistake, anyway, ill try to fix it Razz

Did u download the source ?


yea


Ok, but i want so users can just click the bookmarks center and enter in the information but it shouldnt overwrite eachother buttons, i saw an example at the internet on it, but couldnt figure it out,,

maybe you could help me with it ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites