fprintf(stderr,"failed to make goodpixel pipeline\n");
exit(-1);
Log("Failed to make goodpixel pipeline\n");
quit_with_popup("Couldn't make a shader! Uhhh ooooohhhhhh!!!","Shader error BONED");
}
}
}
@ -646,8 +642,9 @@ static void init(void)
{
if(enet_initialize()!=0)
{
fprintf(stderr,"An error occurred while initializing ENet.\n");
exit(-1);
Log("An error occurred while initializing ENet.\n");
quit_with_popup("Failed to initialize networking, enet error","Networking Error");
}
client=enet_host_create(NULL/* create a client host */,
1/* only allow 1 outgoing connection */,
@ -656,10 +653,8 @@ static void init(void)
0/* assume any amount of outgoing bandwidth */);
if(client==NULL)
{
fprintf(
stderr,
"An error occurred while trying to create an ENet client host.\n");
exit(-1);
Log("An error occurred while trying to create an ENet client host.\n");
quit_with_popup("Failed to initialize the networking. Mama mia!","Networking uh oh");
}
ENetAddressaddress;
ENetEventevent;
@ -670,9 +665,8 @@ static void init(void)
peer=enet_host_connect(client,&address,2,0);
if(peer==NULL)
{
fprintf(stderr,
"No available peers for initiating an ENet connection.\n");
exit(-1);
Log("No available peers for initiating an ENet connection.\n");
quit_with_popup("Failed to initialize the networking. Mama mia!","Networking uh oh");
}
// the timeout is the third parameter here
if(enet_host_service(client,&event,5000)>0&&
@ -687,7 +681,7 @@ static void init(void)
/* had run out without any significant event. */
enet_peer_reset(peer);
Log("Failed to connect to server. It might be too full\n");
quit_with_popup("Failed to connect to server. Is your wifi down? It took too long.","Connection Failure");
quit_with_popup("Failed to connect to server. Is your wifi down? It took too long. The server could also be too full. I unfortunately do not have information as to which issue it is at this time. It could also be that the server is down. I hate this networking library","Connection Failure");
}
}
}
@ -1508,8 +1502,8 @@ static void frame(void)
caseENET_EVENT_TYPE_DISCONNECT:
{
fprintf(stderr,"Disconnected from server\n");
exit(-1);
Log("Disconnected from server\n");
quit_with_popup("Disconnected from server","Disconnected");