Commands.cpp

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
Post Reply
User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Commands.cpp

Post by Gangrenous » Fri Dec 29, 2017 5:24 pm

Around line 2648 in commands.cpp

Code: Select all

if (collection = player->GetPendingCollectionReward())
Probably should be a comparison instead of an assignment
Resident Dirty Hippy

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Commands.cpp

Post by Jabantiz » Fri Dec 29, 2017 5:39 pm

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)

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Commands.cpp

Post by Gangrenous » Fri Dec 29, 2017 5:53 pm

My compiler was complaining about it. I may write it differently.
Resident Dirty Hippy

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: Commands.cpp

Post by tyrbo » Fri Dec 29, 2017 6:21 pm

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.

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Commands.cpp

Post by Gangrenous » Sat Dec 30, 2017 7:14 am

Warning.
Resident Dirty Hippy

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest