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.


Topics - drhaximus

Pages: [1]
1
Network / [FIXED] FTP cannot download file: status is 1003
« on: March 22, 2014, 01:26:17 am »
FIXED.
Refer to the last post for how to fix it.


Hello.
When I try to download a file from a FTP server, I'm able to connect, change directories, get files inside of current directory etc, no connection issues and whatever, but I still get a 1003 error as a status of my download. There's no string inside of getMessage() either.

Here's what I do:

sf::Ftp::Response x=ftp.download("master.txt","C:\"master.txt");
std::cout<<"FTP Download: "<<x.getStatus()<<" : "<<x.getMessage()<<"\n";

It prints:
FTP Download: 1003 :
Nothing after.

Here's the server's log of the ecounter:

Quote
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 230 Logged on
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> PWD
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 257 "/" is current directory.
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> CWD 0.12/
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 250 CWD successful. "/0.12" is current directory.
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> PASV
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 227 Entering Passive Mode (127,0,0,1,199,216)
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> TYPE I
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 200 Type set to I
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> RETR /0.12//master.txt
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 150 Connection accepted
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 226 Transfer OK
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> PWD
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 257 "/0.12" is current directory.
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> PASV
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 227 Entering Passive Mode (127,0,0,1,199,218)
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> TYPE A
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 200 Type set to A
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> NLST /0.12
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 150 Connection accepted
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 226 Transfer OK
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> QUIT
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> 221 Goodbye
(000032)3/22/2014 13:25:37 PM - update (127.0.0.1)> disconnected.

Thanks.

2
Graphics / sf::Text disappearing characters [SFML 2.0]
« on: February 25, 2013, 06:15:33 am »
Hello.
I have a chat function like this...

void addChat(std::string username,int rights,std::string message) {
        std::string chat;
        if(rights>0) {
                chat="[ADMIN] "+username+": "+message;
        }
        else {
                chat=username+": "+message;
        }
        std::string tempChat[6];
       
        for(int i=0;i<=5;i++) {
                tempChat[i]=chatHistory[i].getString();
        }
        chatHistory[0].setColor(sf::Color::Red);
        chatHistory[0].setString(chat);
        chatHistory[1].setString(tempChat[0]);
        chatHistory[2].setString(tempChat[1]);
        chatHistory[3].setString(tempChat[2]);
        chatHistory[4].setString(tempChat[3]);
        chatHistory[5].setString(tempChat[4]);
}

And an initialize function like this...

void chatInit() {
        chatFont.loadFromFile("interfaces/trebucbd.ttf");
        for(int i=0;i<=5;i++) {
                chatHistory[i].setFont(chatFont);
                chatHistory[i].setColor(sf::Color::Black);
                chatHistory[i].setCharacterSize(16);
                chatHistory[i].setString("a");
                chatHistory[i].setPosition(25,i*25+20);
        }
        addChat("SERVER",1,"Welcome to the server!");
}

Then I draw it like this...

void drawChat(sf::RenderWindow& window) {
        for(int i=0;i<=5;i++) {
                window.draw(chatHistory[i]);
        }
}

Before offering solutions, please read this additional information:
  • The text does not lack any characters, in the std::string format, there are no problems with the strings.
  • The text does not continue to work after the initial "Welcome to the server!" message.
  • The font is not the problem, I have tried multiple.
  • I am using SFML 2.0 on Windows 7, compiling with Visual C++ 2010
Thanks, all!

Pages: [1]