They told me growing up that screaming "Fire" when someone tries to attack you is ok, if you feel in immediate danger for your safety as most people don't respond to "help" because they don't want to get involved. Today at the mall someone tried to take something of mine and security was very nice they helped me. But if I'm in a situation where I'm in a dark alley alone and someone grabs me or something like pulls a weapon on me. Is it legally okay to scream "FIRE" to get public attention and assistance or would this be creating a panic? thank you.

Sorry I know it seems like a obvious question, but someone told me (I honestly forget who) that I'd be charged with creating a panic if someone called the fire department, so this is why I'm asking.