The smart contract runs fine on the Solana Playground, but gives error on my local machine.(not found in this scope)
This is my smart contract. (https://github.com/NIXBLACK11/polling-dapp/blob/main/polling-app/programs/polling-app/src/lib.rs)
This runs fine on the Solana Playground(beta.solpg.io)
But on my local machine I get this error.
error[E0425]: cannot find value `user_profile` in this scope
--> programs/polling-app/src/lib.rs:158:56
|
158 | seeds = [POLL_TAG, authority.key().as_ref(), &[user_profile.total_polls as u8].as_ref()],
| ^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `poll_idx` in this scope
--> programs/polling-app/src/lib.rs:176:56
|
176 | seeds = [POLL_TAG, authority.key().as_ref(), &[poll_idx].as_ref()],
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `poll_idx` in this scope
--> programs/polling-app/src/lib.rs:202:56
|
202 | seeds = [POLL_TAG, authority.key().as_ref(), &[poll_idx].as_ref()],
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `poll_idx` in this scope
--> programs/polling-app/src/lib.rs:218:56
|
218 | seeds = [POLL_TAG, authority.key().as_ref(), &[poll_idx].as_ref()],
| ^^^^^^^^ not found in this scope