-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.c
More file actions
36 lines (33 loc) · 1.31 KB
/
Copy patherror.c
File metadata and controls
36 lines (33 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* error.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: akar <akar@student.42istanbul.com.tr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/28 19:13:11 by akar #+# #+# */
/* Updated: 2024/06/01 19:37:36 by akar ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
void errormessage2(t_game *solong, char c)
{
if (c == 'c')
{
free_map(solong, 1);
ft_printf("There's a component that shouldn't exist in map");
}
else if (c == 'a')
{
free_map(solong, 1);
ft_printf("Invalid component amount");
}
else if (c == 'w')
{
free_map(solong, 1);
ft_printf("Congratulations, you won. Kacchoww!");
}
free(solong);
mlx_destroy_window(solong->mlx, solong->mlx_win);
exit(1);
}