Solidity Error Handling

Welcome to the forum discussion for this section. Here you can ask questions or post feedback.

Hi Filip,

can you please take a look of the screenshot I have?
I do not know why there is an error, I think it looks fine…

Thank you very much for your help!

You need to specify what type the functions returns.

When you write ‘returns’ you need to write for example returns (uint) or returns (string).

That’s why it says it expects a ‘(’.

filip nobody can read your code this lesson thing on the side messes up everythig please fix this this is so annoying if i have to learn something but i cant even see everything thats going on

and please make sure all your links open in a new window

im able to delete all persons when i use the contract creator function

If i deploy contract using this address
//0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c i can also delete
the person that was created using this address

I understand that it can be annoying. Some people like large text so that they can have the video in a small window next to the code, so I’ve been getting tons of messages telling me to increase the font.

That unfortunately leads to all code not being on the screen at the same time.

I’m not sure I understand the problem. Could you clarify the issue and attach your code so I can have a look?

i found a work around and look at the code you posted on github i didnt see that earlier, im much slower than you and if i follow you i cant keep up right away so you already far ahead and im stll trying to write the code but than all of a sudden there is only half of the code on the screen, well anyways like i said i just use the github code as reference

but please make sure you have links opened in a new window

oh and regarding the code
i first thought that only the msg.sender can delete the code but also the contract creator can delete the records

Ok, I see.

To clarify about the owner and msg.sender. Msg.sender changes all the time. Anyone can be msg.sender. It’s the current caller of the function. The owner is one specific address. That’s why we check if msg.sender == owner in the delete function, so that only the owner is able to delete people. Does that make sense? :slight_smile: