Uncaught SecurityError: Blocked a frame with origin “null”

I’m having trouble with testing my game.

The error I’m getting is: “Error: startup line [number]: increasing indent not allowed, expected 0 was [number]” AND I’m getting a message when I DO satisfy that Error: “Uncaught SecurityError: Blocked a frame with origin “null” from accessing a cross-origin frame.”

My code looks like this:

 *title Choice of the Guardian

This is my first game, so it may seem choppy. I'm a pretty good storyteller because I imagine everything my characters would do,
so I hope that Choice of the Guardian is as good as I wanted it to be.
 *page_break I'm Sure It's Fine!

    Long ago, before the time of The Curse and during the time of the Garden of Eden, back
when the world was perfect, dragons roamed and ruled the Earth. There were four main kinds of
dragons; the proud fire dragons with their flaming breath and bright, metallic, iron-hard scales. 
The earth dragons that spat scalding acid and deadly stinging tails, no to mention a vastly 
territorial nature. The wind dragons who glided on the winds, having no wings of their own, and able
to fire balls of pure lightning. And last, but not least in any way, the sea dragons with their immense
size and strength, the biggest of all the dragon kinds, they preferred the water over flying, though
the occasional flight was not out of the ordinary.
 
 *line_break
    
    When The Curse was inflicted apon Mankind,The dragons at first tried to continue living on the Earth, but
they found that after three thousand years of trying to coexist was dwindling their race. Mankind hunted them
for sport, took over their homes, and stole their prey. Little by little, they began to realise that there
was no longer a place for them among Mankind. Inherently magical creatures, the dragons, down to the last
dragonette tore a rift, a portal, between an empty, safe world, and this one. Then, they vanished through
it.
 
 *page_break
    
    Well, all except four.
 
 *page_break
    A represenative from each tribe, the copper-colored fire, the pearl-scaled wind, the saphire-plated sea and the 
verdelite earth, each gave up their power to four worthy individuals, one from each corner of the world: modern-era 
Canada, Australia, Peru, and Japan. Each of these people became the first Guardians, gifted with unbreakable bones, 
the power to control their respective elements, and a fantastic healing ability.
 
 *line_break
    
    But perhaps their greatest ability was to be able to transform into the dragons of old.
 
 *page_break Cool
1 Like

Hello! You seem to have quite a few of indentation errors. I fixed and ran this code below, so try to copy-and-paste that in.

*title Choice of the Guardian

This is my first game, so it may seem choppy. I'm a pretty good storyteller because I imagine everything my characters would do,
so I hope that Choice of the Guardian is as good as I wanted it to be.

*page_break I'm Sure It's Fine!
Long ago, before the time of The Curse and during the time of the Garden of Eden, back
when the world was perfect, dragons roamed and ruled the Earth. There were four main kinds of
dragons; the proud fire dragons with their flaming breath and bright, metallic, iron-hard scales. 
The earth dragons that spat scalding acid and deadly stinging tails, no to mention a vastly 
territorial nature. The wind dragons who glided on the winds, having no wings of their own, and able
to fire balls of pure lightning. And last, but not least in any way, the sea dragons with their immense
size and strength, the biggest of all the dragon kinds, they preferred the water over flying, though
the occasional flight was not out of the ordinary.
 
*line_break
    
When The Curse was inflicted apon Mankind,The dragons at first tried to continue living on the Earth, but
they found that after three thousand years of trying to coexist was dwindling their race. Mankind hunted them
for sport, took over their homes, and stole their prey. Little by little, they began to realise that there
was no longer a place for them among Mankind. Inherently magical creatures, the dragons, down to the last
dragonette tore a rift, a portal, between an empty, safe world, and this one. Then, they vanished through
it.
 
*page_break
Well, all except four.
 
*page_break
A represenative from each tribe, the copper-colored fire, the pearl-scaled wind, the saphire-plated sea and the verdelite earth, each gave up their power to four worthy individuals, one from each corner of the world: modern-era 
Canada, Australia, Peru, and Japan. Each of these people became the first Guardians, gifted with unbreakable bones, 
the power to control their respective elements, and a fantastic healing ability.
 
*line_break
    
But perhaps their greatest ability was to be able to transform into the dragons of old.
 
*page_break Cool

Indentation is very important in choice script! Try not to start each line with blank space. Certain commands need to be indented (choices have indented bodies, if statements, etc.) but as a rule of thumb if you’re just starting out always check for extra spaces (tabs, stray space bar presses, etc) at the beginning of your lines! :blush:

2 Likes

Alright, it works now, thank you. But I am still getting the second error message: “Uncaught SecurityError: Blocked a frame with origin “null” from accessing a cross-origin frame.”

I’m having trouble with manually testing my game.

The error I’m getting is: “Uncaught SecurityError: Blocked a frame with origin “null” from accessing a cross-origin frame.”

My code looks like this:

*title Choice of the Guardian

This is my first game, so it may seem choppy. I'm a pretty good storyteller because I imagine everything my characters would do,
so I hope that Choice of the Guardian is as good as I wanted it to be.

*page_break I'm Sure It's Fine!

Long ago, before the time of The Curse and during the time of the Garden of Eden, back
when the world was perfect, dragons roamed and ruled the Earth. There were four main kinds of
dragons; the proud fire dragons with their flaming breath and bright, metallic, iron-hard scales. 
The earth dragons that spat scalding acid and deadly stinging tails, no to mention a vastly 
territorial nature. The wind dragons who glided on the winds, having no wings of their own, and able
to fire balls of pure lightning. And last, but not least in any way, the sea dragons with their immense
size and strength, the biggest of all the dragon kinds, they preferred the water over flying, though
the occasional flight was not out of the ordinary.
 
*line_break
    
When The Curse was inflicted apon Mankind,The dragons at first tried to continue living on the Earth, but
they found that after three thousand years of trying to coexist, their race was dwindling. Mankind hunted them
for sport, took over their homes, and stole their prey. Little by little, they began to realise that there
was no longer a place for them among Mankind. Inherently magical creatures, the dragons, down to the last
dragonette, tore a rift, a portal, between an empty, safe world, and this one. Then, they vanished through
it.
 
*page_break

Well, all except four.
 
*page_break
A represenative from each tribe, the copper-colored fire, the pearl-scaled wind, the saphire-plated sea and the verdelite earth, each gave up their power to four worthy individuals, one from each corner of the world: modern-era 
Canada, Australia, Peru, and Japan. Each of these people became the first Guardians, gifted with unbreakable bones, 
the power to control their respective elements, and a fantastic healing ability.
 
*line_break
    
But perhaps their greatest ability was to be able to transform into the dragons of old.
 
*page_break Cool

So, when I run your game (by copying-and-pasting the code into the CSIDE editor) I don’t get that error. How are you running your game?

Are you running with the latest copy of ChoiceScript? Due to browser security changes you now need to “upload” your files, to make them accessible/runnable. Or you can install nodejs, and run a local server (or use CSIDE).

I have all the necessary things installed. I don’t understand why it will not work.

Normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host. Above error message shows that you can’t access an < iframe > with different origin using JavaScript/jQuery, it would be a huge security flaw if you could do it.

window.postMessage() provides a controlled mechanism to securely circumvent this restriction.