Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - VotingStatue71

Pages: [1]
1
General / Re: .exe file not found
« on: January 08, 2016, 11:10:24 pm »
Actually reworked the code, piece by piece, and figured out that it has something to do with the ResourcePath that I downloaded off subconscious bias (), and when I remove the resourcePath() function, the .exe file came back!  :D

Is there way else I could replace the resource Path so that I can still access the image for a sprite?

2
General / Re: .exe file not found
« on: January 07, 2016, 05:35:24 am »
The .exe files are created alongside the project, and the thing that gets me is that I can run a similar project (minus the sprite part) and the .exe file goes nowhere.

I haven't tried doing the doodad with the antivirus, though: I'll try it out and see if that works

3
General / .exe file not found
« on: January 07, 2016, 12:40:48 am »
So I got to working with SFML recently, and I've just encountered a problem, that being whenever I attempt and create a sprite, my .exe file removes itself COMPLETELY from my desktop, making anything I attempt to create unworkable after that.

Here is my code:
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

#include <iostream>

#include "ResourcePath.hpp"

using namespace std;
int main()
{
        //Variables
        int MaxFPS = 80;


        //Creating the window
        sf::RenderWindow gameWindow(sf::VideoMode(800, 600), "A Technical Problem");


        //Creating the Handler
        sf::WindowHandle theHandle;


        //Controlling the FrameRate
        gameWindow.setFramerateLimit(MaxFPS);


        //Creating the Test Player
        sf::Texture PlayerTexture;
        PlayerTexture.setSmooth(false);
        if (!PlayerTexture.loadFromFile(resourcePath() + "Player1.png"))
        {
                cout << "The Player 1 image did not load properly" << endl;
                return EXIT_FAILURE;
        }
        sf::Sprite PlayerS(PlayerTexture);



        //Main Game Loop
        while (gameWindow.isOpen())
        {


                //Detecting input
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::D))
                {

                }


                //Process Events
                sf::Event theEvent;
                while (gameWindow.pollEvent(theEvent))
                {

                //Closing the Main Game Loop
                        if (theEvent.type == sf::Event::Closed)
                        {
                                gameWindow.close();
                        }
                }


                //Clearing the Game Window
                gameWindow.clear();


                //Drawing the Sprites
                gameWindow.draw(PlayerS);


                //Updating the window
                gameWindow.display();


        }


        return EXIT_SUCCESS;
}
 
And I'm not sure what to do about it: I haven't seen anything similar to this topic on the internet at all (and believe me, I looked), so if someone has an answer to this, please respond so.

Pages: [1]
anything