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 - Hundrea

Pages: [1]
1
Network / Re: Problems with compiling
« on: October 10, 2013, 04:29:48 pm »
i got it working in codeblocks  ;D

2
Network / Re: Problems with compiling
« on: October 10, 2013, 12:08:43 am »
http://prntscr.com/1wbp5g
I still get a error though. Every time I click compile I just get this. http://prntscr.com/1wbpbt
http://prntscr.com/1wbqmm http://prntscr.com/1wbrkj

3
Network / Problems with compiling
« on: October 09, 2013, 01:44:16 am »
I have a problem when compiling.Keep getting these errors.http://prntscr.com/1w4zts
Heres the code
#include <iostream>
#include <SFML/Network.hpp>
using namespace std;


class NewBot{
sf::TcpSocket socket;
int ChatID;
public:
bool Connect(string ip,int port);
bool sendPackets(char data[100]);
string recievePackets();
NewBot(int k,int id);
};

NewBot::NewBot(int k,int id){
string ip="151.5151.15151.5418541";
int port=10014;
if(this->Connect(ip,port)){
    cout <<"Test1";
    //Room Number here
    char sendthingy[100]="<y r=\"15\" m=\"1\" />";
    this->sendPackets(sendthingy);
    cout << this->recievePackets();
}
}

bool NewBot::Connect(string ip,int port){
    sf::Socket::Status status=socket.connect(ip,port);
    bool returnvalue;
    if(status!=sf::Socket::Done){
        returnvalue=false;
    }
    else{
        returnvalue=true;
    }
    return returnvalue;
}

bool NewBot::sendPackets(char data[100]){
if(socket.send(data,100)!=sf::Socket::Done){
    cout<<"Error Could not send Packets";
    return false;
}
else{
    return true;
}
}

string NewBot::recievePackets(){
char data[100];
std::size_t received;
socket.receive(data, 100, received);
return data;
}


int main(){
int k,id; cin>>k; cin>>id;
NewBot Bot(k,id);
}
 
I compiled it with sfml 2.1

4
SFML projects / Re: first SFML game
« on: April 15, 2013, 04:56:04 pm »
since you keep getting smaller. wat if u make an nanobyte mode where you run from bacteria and eat glucose.U enter nanobyte mode when u get super small.

5
SFML projects / Re: first SFML game
« on: April 15, 2013, 01:33:07 am »
u can add a wolf that cases the sheep and u have to get points while running from the wolf.Also u can add a levels where the game get harder and harder

6
General discussions / Re: Flash Chat
« on: February 25, 2013, 04:19:48 am »
do u have to install something to go to an irc? i never used one

7
General discussions / Flash Chat
« on: February 25, 2013, 03:05:33 am »
Flash Chat to get help for SFML(mostly for me to get help) :P
http://xat.com/sfml

8
General / Installing SFML Eclipse
« on: February 21, 2013, 03:31:16 am »
Can someone please tell me how to install eclipse.(in steps by steps)

9
Window / Re: video mode thingy
« on: February 18, 2013, 07:44:11 pm »
ok, i understood 0.1% of what you said but thats sound like a valid answer so im good:P

10
Window / video mode thingy
« on: February 18, 2013, 03:57:11 am »
hi i'm new to sfml/c++ can some one explain how
 sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
 
  works? Hows doe it make an constructor equal an function?

11
Window / Re: SFML window won't show
« on: February 16, 2013, 09:28:07 pm »
thanks it works now

12
Window / Re: SFML won't window won't show
« on: February 16, 2013, 05:17:02 am »

13
Window / Re: SFML won't window won't show
« on: February 16, 2013, 04:53:13 am »
the version of my gcc is 4.7 exactly

14
Window / Re: SFML won't window won't show
« on: February 16, 2013, 04:40:48 am »
i also tryed changing it to gui applicaityon but the same error appears

15
Window / SFML window won't show
« on: February 16, 2013, 04:17:54 am »
I recently tryed to using SFML with code block using http://www.sfml-dev.org/tutorials/2.0/start-cb.php
When i try to use the code :
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}
All i get is   
This happens when i try other code that makes a window

Pages: [1]
anything