Results 1 to 12 of 12
  1. #1
    xBear Grylls's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Maryland
    Posts
    198
    Reputation
    14
    Thanks
    27
    My Mood
    Psychedelic

    Alarm Timer code error

    Image 1: https://i.imgur.com/DyRXU9Z.png
    Image 2: https://i.imgur.com/MHHxy4w.png
    Why is it doing this? Thanks
    Last edited by xBear Grylls; 03-07-2013 at 05:44 PM.

  2. #2
    Cryptonic's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    United Provinces of Canada
    Posts
    1,315
    Reputation
    44
    Thanks
    190
    My Mood
    Bored
    Try to use TimeOfDay as a string. I think I've had this problem before...

  3. The Following 2 Users Say Thank You to Cryptonic For This Useful Post:

    abuckau907 (03-07-2013),xBear Grylls (03-07-2013)

  4. #3
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Conversion from string "Label2" to type 'Date' is not valid.

    is because the data types are not the same. Ie. Label.Text (a string) must be set == a string

    Dim xx as Int32 = "MyNameIsSteve" // invalid! a number can't be set to a string.
    Dim ss as String = 123456 // invalid!

    Dim xx as DateTime = 1234 // invalid.

    Dim xx as Int32 = Date.Now() // invalid.


    ie. as pepsihacker said 'Try to use TimeOfDay as a string.'

    Label1.Text = Date.Now.ToString() // has LOTS of overloads.
    (ToString is special, I'm not going to explain why)

    Label1.Text = TimeOfDat <--String variable, Date variable--> NOT the same 'type'.
    Last edited by abuckau907; 03-07-2013 at 08:17 PM. Reason: not sure tbh
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  5. The Following User Says Thank You to abuckau907 For This Useful Post:

    DawgiiStylz (03-07-2013)

  6. #4
    Raow's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    47°37′39″N 122°14′32″W
    Posts
    2,720
    Reputation
    140
    Thanks
    596
    Errrm, lol?
    MsgBoxStyle is part of the actual message of the MSGBox. you might wanna change where the quotation marks are.

  7. #5
    Threadstarter
    Advanced Member
    xBear Grylls's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Maryland
    Posts
    198
    Reputation
    14
    Thanks
    27
    My Mood
    Psychedelic
    Solved
    I dont know how to change it.

  8. #6
    dnj$nda94manbdw's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    World Of Network...
    Posts
    1,343
    Reputation
    88
    Thanks
    1,148
    My Mood
    Angelic
    your smart at VB do you dose HTML?
    Quote Originally Posted by abuckau907 View Post
    Conversion from string "Label2" to type 'Date' is not valid.

    is because the data types are not the same. Ie. Label.Text (a string) must be set == a string

    Dim xx as Int32 = "MyNameIsSteve" // invalid! a number can't be set to a string.
    Dim ss as String = 123456 // invalid!

    Dim xx as DateTime = 1234 // invalid.

    Dim xx as Int32 = Date.Now() // invalid.


    ie. as pepsihacker said 'Try to use TimeOfDay as a string.'

    Label1.Text = Date.Now.ToString() // has LOTS of overloads.
    (ToString is special, I'm not going to explain why)

    Label1.Text = TimeOfDat <--String variable, Date variable--> NOT the same 'type'.

  9. #7
    rileyjstrickland's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Florida
    Posts
    649
    Reputation
    90
    Thanks
    4,010
    My Mood
    Relaxed
    Here are several methods to fix your error (@abuckau907 these methods are "better" in my opinion.)

    1.) Create a global variable for the date you are waiting for.
    2.) Use
    Code:
    if wait_date <= date.now then
    'code
    else
    'code
    end if
    OR you can also use
    Code:
    if Cdate(label2.text) <= date.now then
    'code
    else
    'code
    end if
    This is assuming you are using date.now for the date, or are at least following correct date datatype formatting. (Example (Generated with date.now) 3/10/2013 4:33:55 PM)

    If You Like My Releases, Hit The Thanks button!
    Follow the rules.

    Successful Purchases: 2
    @The403
    @sundy42
    Successful Sales: 1
    @wZ. Gali
    Scammed: 1

    Favorite Quotes:
    Quote Originally Posted by Doc View Post
    Who cares about simplified mandarin. The only problem here is that Cantonese (and Hokkien) is no longer being taught, but guess what, times change. There have been thousands of languages that have been lost to the ages, you'd be pissing in the wind to try and stop that.

  10. #8
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    (@rileyjstrickland "Better." Better than what? Did I post a solution to his problem, or a description (albeit poor) of the problem?
    When OP knows what data type is, I might start talking about 'efficiency'/'better'.)
    Last edited by abuckau907; 03-10-2013 at 10:25 PM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  11. #9
    rileyjstrickland's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Florida
    Posts
    649
    Reputation
    90
    Thanks
    4,010
    My Mood
    Relaxed
    Quote Originally Posted by abuckau907 View Post
    (@rileyjstrickland "Better." Better than what? Did I post a solution to his problem, or a description (albeit poor) of the problem?
    When OP knows what data type is, I might start talking about 'efficiency'/'better'.)
    It was late and I was tired. When I'm awake your posts are hard enough to read .
    Please format them a little bit

    If You Like My Releases, Hit The Thanks button!
    Follow the rules.

    Successful Purchases: 2
    @The403
    @sundy42
    Successful Sales: 1
    @wZ. Gali
    Scammed: 1

    Favorite Quotes:
    Quote Originally Posted by Doc View Post
    Who cares about simplified mandarin. The only problem here is that Cantonese (and Hokkien) is no longer being taught, but guess what, times change. There have been thousands of languages that have been lost to the ages, you'd be pissing in the wind to try and stop that.

  12. #10
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    ok .
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  13. #11
    wut12345's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    294
    Reputation
    16
    Thanks
    1,453
    label1.text = timeofday

    if label2.text = label1.text then
    label3.text = "Alarm!!"
    timer1.stop
    endif
    Easy way.

  14. #12
    Threadstarter
    Advanced Member
    xBear Grylls's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Maryland
    Posts
    198
    Reputation
    14
    Thanks
    27
    My Mood
    Psychedelic
    Its solved a while ago.

Similar Threads

  1. HelP Xtrap Code-Error ! :( please ! HelP ME ! ,,,
    By hamadamaxxx in forum CrossFire Help
    Replies: 8
    Last Post: 03-27-2011, 05:26 PM
  2. Crossfire Code Error
    By maxedcb in forum CrossFire Help
    Replies: 14
    Last Post: 02-09-2011, 01:16 PM
  3. [HELP]Code ERROR
    By ArmandoBond in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 11-07-2010, 05:21 AM
  4. Hack not working, code error I think
    By myonemanga in forum C++/C Programming
    Replies: 2
    Last Post: 01-07-2010, 09:57 AM
  5. > KWR KSSN code error <
    By gameking57 in forum WarRock Korea Hacks
    Replies: 8
    Last Post: 08-23-2007, 04:03 PM