You have declared your draw_hud
function to take three parameters, namely proportion
, player
and planet
.
void draw_hud(double proportion, const player_data &player, const planet_data &planet);
but when you call the function you only give two parameters
draw_hud(player, planet);
The proportion parameter is missing.
The answer is not to convert a player to a double. The answer is to call your function with the correct number of parameters. Either add a parameter to where you call the function e.g.
draw_hud(1.0, player, planet);
(obviously I just made up the number 1.0
, only you know what the correct number is).
Or remove the extra parameter from your declaration
void draw_hud(const player_data &player, const planet_data &planet);
Either way the number of parameters in the declaration and in the function call must be the same.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…