Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][StyleCopy warnings]Added request functionality #1149

Closed
wants to merge 3 commits into from
Closed

[WIP][StyleCopy warnings]Added request functionality #1149

wants to merge 3 commits into from

Conversation

buggy213
Copy link
Contributor

@buggy213 buggy213 commented Sep 5, 2016

As described in #1075, currently with no support in the trade GUI

// Gets a random trader from the list
public Trader RequestRandomTrader () {

Trader joe = traders.Values.ToList()[UnityEngine.Random.Range (0, traders.Count)];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UnityEngine.Random.Range (0, traders.Count)]

should be

UnityEngine.Random.Range (0, traders.Count - 1)]

I think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the int version of Random.Range goes from min (inclusive) to max (exclusive). That code is correct.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Returns a random integer number between min [inclusive] and max [exclusive](Read Only).

this one always confuse me, sorry.

@Grenkin1988
Copy link
Contributor

@buggy213 buggy213 closed this Sep 5, 2016
@buggy213
Copy link
Contributor Author

buggy213 commented Sep 5, 2016

oops

@mikejbrown mikejbrown reopened this Sep 5, 2016
@Grenkin1988 Grenkin1988 changed the title [WIP]Added request functionality [WIP][StyleCopy warnings]Added request functionality Sep 5, 2016
@buggy213 buggy213 closed this Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants