Search found 41 matches

by TheCollector
August 17th, 2019, 6:55 pm
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

Got it working. I might not have noticed that Chili wasn't actually putting that within the scope of ComposeFrame if you didn't say something about not defining a function within a function. Thanks again.
by TheCollector
August 17th, 2019, 6:37 pm
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

Ah. I don't get any errors when I do that, but when I run it I get an error somewhere else. I'm still doing something wrong. I'll have to watch the tutorial again and try to see what I'm missing.
by TheCollector
August 17th, 2019, 6:23 pm
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

I definitely declared the function within the Game class (at least I think. I put it right where Chili did and it says it's under the Game class) but I decided to try putting my definition outside of ComposeFrame and it it will build like that without any errors so I was trying to define the functio...
by TheCollector
August 17th, 2019, 1:29 am
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

Now I'm getting the member function Game::DrawTree may not be redeclared outside it's class, expected a ';', expected a declaration, 'Game::DrawTree': local function definitions are illegal.
by TheCollector
August 17th, 2019, 1:11 am
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

I see that Chili isn't putting a semi-colon at the end of that first line of code you copy and pasted but when I don't put it in I get an error that it expected a ';'
by TheCollector
August 17th, 2019, 1:08 am
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

I wish I did but I don't. This is my first time creating a function.
by TheCollector
August 16th, 2019, 7:57 pm
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

Okay, those last two errors were from the line of code where I tried to call the function into use. I removed that for now. Now I'm just getting "member function "Game::DrawTree" may not be redeclared outside it's class" and 'void Game::DrawTree(int,int,int,int,int)': redeclaration of member is not ...
by TheCollector
August 16th, 2019, 7:43 pm
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Re: Trouble creating a Function

I'm also getting "unresovled external symbol "void_cdecl DrawTree(void)" (?DrawTree@@YAXXZ) referenced in function "private: void_thiscall Game::ComposeFram(void)" (?ComposeFrame@GAme@@AAEXXZ)" and "1 unresolved externals" when I add the parameters to it. When I run it without the parameters these t...
by TheCollector
August 16th, 2019, 7:36 pm
Forum: Everything
Topic: Trouble creating a Function
Replies: 11
Views: 82

Trouble creating a Function

I'm on tutorial 6 of Chili's and he's creating a function in that one for DrawBox. I followed it the way he did it exactly the only difference is I named my function DrawTree because it's drawing a tree not a box. I'm getting an error when I declare the function: /********************************/ /...
by TheCollector
August 13th, 2019, 9:46 pm
Forum: Everything
Topic: Is it possible to use SFML to display an image to a window that's already been created?
Replies: 1
Views: 47

Is it possible to use SFML to display an image to a window that's already been created?

In short, I want to use SFML to display an image to the window that's already been created in the Chili framework. Is this possible? If so, how do I go about doing it? I've found tutorials and information on textures, sprites and displaying images and such with SFML but all the tutorials are for cre...