Solidity Basics

Hello sir, after the people.push, look at the last parameter (“height”), you should not have a comma at the end of the last parameter.

If you have any doubt, please let us know so we can help you!

Carlos Z.

1 Like

Thank you for your reply and I have amendent the comma error, however, I am still getting an error about not recognising ‘lenght’ in the directory, see attached. Again thanks for takin the time to help me out…

AJ

@filip @thecil can anyone help with this error I get now please, tried loads of different things and I might be missing something?!

Cheers

It’s only the variable “people.lenght”, LENGTH, you misspell the property name.

If you have any doubt, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

@thecil Thank you sir and lol in me not being able to see that

2 Likes

Don’t worry @coletto27, you’re not the only one. It’s a very common mistake :wink:

1 Like

Hi, I have a question regarding the struct lesson.

My code works but it pushes the first created person under position " 1" in the array, instead of “0” which happened when Filip run his code. I don’t understand why it does this.
Here’s my code:

pragma solidity 0.5.12;

contract HelloWorld{

struct Person{
    uint id;
    string name;
    uint age;
    uint height;
   
}
Person[] public people;

function createPerson(string memory name, uint age, uint height) public{
    people.push(Person(people.length, name, age, height));
}

}

Hello, seeking assistance with deploying on this version of remix. Please see screenshot. I think it is adding plugins? Should I activate them all? Also trying to find how to compile as well, is that the bugs? Or where to choose the compiler as it isn’t clear…will play around a bit.

Salud.

1 Like

Hi,

Via Plugin Manager, you can install DEPLOY & RUN TRANSACTIONS and SOLIDITY COMPILER plugins. This last plugin will find the right compiler to match the pragma statement.

2 Likes

https://remix.ethereum.org
I’m not getting anything. It goes out and finds it but nothing is there.

https://remix.ethereum.org does not give me anything. No error, just blank page.

I had the same thing when using the Brave browser…still am using Brave, just shut off the brave shields and waited and it takes time to load.

2 Likes

that’s great…however I got a bit click happy and installed so many that if filled up the left column and there does not appear to be a way to unplug them nor scroll down to see the installed plugs below the settings…

ok,resolved…got to ‘featured plugins’ where I could deactivate…then found the solidity compiler

1 Like

not compiling apparently do to an SPDX license identifier not provided.

It appears that this is needed: SPDX-License-Identifier: UNLICENSED

but it wasn’t accepted

1 Like

It’s a warning, you compiled the contract successfully. You can deploy it.

1 Like

Indeed it was, ty

however I do not get any of the message buttons under deployed contracts…why?

**resolved…just needed to open the ‘>’ tree…matter of just getting familiar with Remix

I get an error message here…not sure why???


***resolved…I had commented out the instantiation in error

I can’t get my data structure code to compile. It looks exactly like yours but there is one thing. I wanted to save the code for reference and created a new contract.

Can you help me?

Sorry, never mind. I figured it out.

1 Like

Hi @dbeelow0323,

Seems like you’ve had some issues getting started with Remix. Have you resolved all of the following issues now? I just wanted to check if everything was OK :slight_smile:

2 Likes