Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2012
    Posts
    11

    Please help me! C++ complete vid

    I am trying to do this exactly how they tell me in VTM 3 in the level section. I do not want to re watch this again so I thought you guys could help me out a lil. here are the errors I am getting. If any advanced or even intermediate programmer wants to help me learn C++ feel free to pm me or something. I would love to learn this but its kinda hard to self teach yourself. So back to the matter at hand. Here is my errors.



    1>------ Build started: Project: EvilMonkeys, Configuration: Debug Win32 ------
    1> Level.cpp
    1>c:\users\globesk8rr\documents\visual studio 2010\projects\evilmonkeys\evilmonkeys\level.cpp(41 ): warning C4806: '==' : unsafe operation: no value of type 'bool' promoted to type 'int' can equal the given constant
    1> Game.cpp
    1>c:\users\globesk8rr\documents\visual studio 2010\projects\evilmonkeys\evilmonkeys\game.cpp(40) : error C2039: 'keyPress' : is not a member of 'Level'
    1> c:\users\globesk8rr\documents\visual studio 2010\projects\evilmonkeys\evilmonkeys\level.h(16) : see declaration of 'Level'
    1> Generating Code...
    1> Compiling...
    1> Sprite.cpp
    1> Main.cpp
    1> Character.cpp
    1> Generating Code...
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


    I can not find the errors for nothing. I tried to find these but its a no go. I have had like 20 more errors more than this and fixed them on my own so I am learning. But for some reason I can not find these.. If you can help I would appreciate it tremendously...

    Thank You,
    Future Programmer

  2. #2
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    1,234
    You should post your code for level.cpp and game.cpp and level.h so the code can be pinpointed.

    From here it looks like you're trying to compare a bool and int which is just a warning but because its promoted to an int, it will never be true.

    your error is simply that you're trying to treat keypress as a member of your level class but it's not. you need to declare it (and possibly define it if you havent) in your level.h and level.cpp files, respectively.

    hope this helps.

    also, if you double click on the error/message and take in what it says, these issues should be pretty opaque.
    Intel Core i3 2120 running @ 3.30 Ghz && 8GB Corsair Vengeance RAM @ 1333Mhz && XFX Radeon HD 6850 @ 1920x1080 && 600w PSU && 2TB In-Case Storage (Boot drive: OCZ Vertex 4 128GB SSD) && ASUS P8H77-V LE Mobo && ThermalTake Tsunami Dream Case && Black Widow Mechanical Keyboad && Thermaltake Black Gaming Mouse

  3. #3
    Join Date
    Feb 2012
    Posts
    11
    Thank you for your help but I found the problem. I misspelled keyPress... I had my code misspelled is what it was. I had a warning about the = operator... but now I cant see that warning because when I compile and build it, it comes up as 1 up to date instead of success or fail. What do I do to get rid of that update message. looks like this:


    ========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========


    I do appreciate your help, your message kinda made me see my error. Also right now my level is kinda messed up a little. I will have to find out what is going on to figure this out now. If you can tell me how to make it to an exe file and I can post it up here for ppl to test it out a little. It is from the video so its the game on the vtm but, I am still proud of it.

  4. #4
    Join Date
    Feb 2012
    Posts
    11
    Just you let you know that = operator warning is gone. I dont know what I did about that warning but it no longer exists. There is still a problem with my code though. I am supposed to have walls a certain amount around and I have walls all on the outside of the screen except the right side lol. I need to figure out where I went wrong on that but C++ is very fun to learn and I might learn it enough to be a programmer. I cant wait to be able to make my own windows program with windows 64bit capable but that might not be for a year from now but I sure can try lol.

  5. #5
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    1,234
    You're gonna have to post the appropriate code. Just copy and paste it using the code option of the forum (the bars above the reply text box) otherwise it's really hard to see what's going wrong.
    Intel Core i3 2120 running @ 3.30 Ghz && 8GB Corsair Vengeance RAM @ 1333Mhz && XFX Radeon HD 6850 @ 1920x1080 && 600w PSU && 2TB In-Case Storage (Boot drive: OCZ Vertex 4 128GB SSD) && ASUS P8H77-V LE Mobo && ThermalTake Tsunami Dream Case && Black Widow Mechanical Keyboad && Thermaltake Black Gaming Mouse

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •