void Player::drop(RenderWindow &window, float what, float howMany, string name)
{
RectangleShape items(Vector2f(20, 20));
fstream file;
window.draw(items);
if(Mcollision(window, items))
{
if(Mouse::isButtonPressed(Mouse::Right))
{
what = what + howMany;
file.open("C:/Game/" + login + "/Player/Saves/Items" + name);
file << what;
file.close();
cout << what;
}
}
}
Nie wiem czemu nie wywala do pliku wartości "what" nie nie dodaje what do howMany. tylko wypisuje howMany