smartcontractkit/documentation

[Bug]: Get Random Numbers Docs `getHouseName()` Fails to Compile and does not match VRFD20 Contract

Andy-Waine opened this issue · 0 comments

Describe the bug

Within the step-by-step instructions in the Getting Started -> Get Random Numbers documentation....
a line of code:
(a) causes the Remix Solidity compiler to error out with a Failure
(b) does not match the completed reference contract (VRFD20) provided by the Chainlink team

To Reproduce

  1. Go to the the getHouseName() function within the Getting Started -> Get Random Numbers - > "house function" section of the Chainlink docs.
  2. See the return houseNames[id.sub(1)]; at the bottom of the getHouseNames function.
  3. Compare the appearance of the line in the docs to the actual VRFD20 contract (return houseNames[id - 1];)
  4. Replace this working line in the contract with the broken line from the docs (mentioned in step 2)
  5. Attempt to compile the contract, receive the following error:

Chainlink getHouseName VRFD20 Error 02 18 2023

URLs

https://docs.chain.link/getting-started/intermediates-tutorial#house-function

Expected behavior

The step-by-step examples should:
(a) be able to be compiled and deployed successfully by those navigating the Chainlink docs
(b) match the complete contract that it references

Additional context

N/A