Did you select a value in the Cookie expire after setting?
\IPS\Request::i()->setCookie( \IPS\Settings::i()->newtopicrulesCookiePrefix . '_' . $forum->id, TRUE, \IPS\DateTime::create()->add( new \DateInterval( 'P'. \IPS\Settings::i()->newtopicrulesCookiesDays . 'D' ) ) );
Choose a number. Hit save. Try again.
Got no error here, as you can see in the screen video.