(a) No person shall climb, jump, step or stand upon or cling or attach himself to a locomotive, engine or car upon the track of a railroad, unless in compliance with law or by permission under the rules of the corporation managing such railroad.
(b) Violations of this section shall be subject to the penalty provided in Section 501.99(d).