an educated user is worth 2
justified vm behaviour with more comprehensive messages
This commit is contained in:
parent
89efc78f22
commit
de92403dd0
@ -6,7 +6,7 @@
|
|||||||
/* By: igarbuz <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: igarbuz <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/07/11 16:54:36 by igarbuz #+# #+# */
|
/* Created: 2019/07/11 16:54:36 by igarbuz #+# #+# */
|
||||||
/* Updated: 2019/07/13 17:21:07 by tmaze ### ########.fr */
|
/* Updated: 2019/07/17 14:53:50 by tmaze ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -24,8 +24,8 @@ int err_msg(int err, t_vm *vm)
|
|||||||
else if (err == 4)
|
else if (err == 4)
|
||||||
ft_printf("Error champ no.%d: File is not .cor\n", vm->nb_j);
|
ft_printf("Error champ no.%d: File is not .cor\n", vm->nb_j);
|
||||||
else if (err == 5)
|
else if (err == 5)
|
||||||
ft_printf("Error champ no.%d: Number %d already in use\n", vm->nb_j
|
ft_printf("Error champ no.%d: Number already in use/invalid\n"
|
||||||
, vm->pls[vm->nb_j].num);
|
, vm->nb_j);
|
||||||
else if (err == 6)
|
else if (err == 6)
|
||||||
{
|
{
|
||||||
ft_printf("Error dump: Missing or Invalid number\n");
|
ft_printf("Error dump: Missing or Invalid number\n");
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/05/20 18:20:48 by tmaze #+# #+# */
|
/* Created: 2019/05/20 18:20:48 by tmaze #+# #+# */
|
||||||
/* Updated: 2019/07/13 17:22:28 by tmaze ### ########.fr */
|
/* Updated: 2019/07/17 14:39:41 by tmaze ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -113,5 +113,7 @@ int cw_parser(int ac, char **av, t_vm *vm)
|
|||||||
vm->nb_j++;
|
vm->nb_j++;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
if (i < ac)
|
||||||
|
ft_putstr("More than 4 champs passed, Ignoring no.5 & up...\n");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user