Page 1 of 1
Commands.cpp
Posted: Fri Dec 29, 2017 5:24 pm
by Gangrenous
Around line 2648 in commands.cpp
Code: Select all
if (collection = player->GetPendingCollectionReward())
Probably should be a comparison instead of an assignment
Re: Commands.cpp
Posted: Fri Dec 29, 2017 5:39 pm
by Jabantiz
This one is actually correct how it is, basically it is assigning to the variable (pointer) and then checking if the pointer is valid.
It is the same as doing this
Code: Select all
collection = player->GetPendingCollectionReward();
if (collection)
Re: Commands.cpp
Posted: Fri Dec 29, 2017 5:53 pm
by Gangrenous
My compiler was complaining about it. I may write it differently.
Re: Commands.cpp
Posted: Fri Dec 29, 2017 6:21 pm
by tyrbo
Weird that your compiler would complain about that.
Error or warning?
Maybe it thinks you meant to do == and is trying to protect you from a silly bug.
Re: Commands.cpp
Posted: Sat Dec 30, 2017 7:14 am
by Gangrenous
Warning.