16
Audio / Music Error
« on: June 11, 2011, 10:14:09 pm »
The error message was the same, I meant. But it had a .ogg instead of .mp3 on the file name.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
sf::Music Music1;
if(Music1.OpenFromFile("DevoWhip.mp3"))
Music1.Play();
Failed to read sound file "DevoWhip.mp3" (File contains data in an unknown format.)
Failed to open "DevoWhip.mp3" for reading
sf::Text text = ("Meet Gary");
text.SetFont(sf::Font::GetDefaultFont());
Window.Draw(text);
1>c:\users\desktop\visc++\Project\Project\main.cpp(14) : error C2440: 'initializing' : cannot convert from 'const char [10]' to 'sf::Text'
1> Constructor for class 'sf::Text' is declared 'explicit'
sf::Text Text - "Meet Gary";
Text.SetFont(sf::Font::GetDefaultFont());
Window.Draw(Text);
1>c:\users\desktop\visc++\Project\Project\main.cpp(13) : error C2440: 'initializing' : cannot convert from 'const char [10]' to 'sf::Text'
1> Constructor for class 'sf::Text' is declared 'explicit'
sf::RenderWindow Window;
...
Window.Draw (Text);
sf::String Text = "Nacho Cheese";
Text.SetFont(sf::Font::GetDefaultFont());
Text.SetScale(2.f, 2.f);