Network prefix length My router IP is 10.0.4.1
Sub 255.255.255.0
so from what I understand my Network prefix length should be 24

I'm I right?

However I keep having issue when I enter this value

This might be an Apple Specific question but perhaps I can have some advice
This information is readily available online if you know what to search for. Specifically "Subnet Calculator."

24 in that context is sometimes referred to that way but really it is the number of bits in the netmask.

Honestly your question could easily be closed as your question does not have enough detail to make it specifically about an Apple product or service. 

Please edit your question to give all of the details of what exactly you are doing and what results you are getting and what results you need/want. That may help to answer your question.