"Unable to get value of the property" error

The problem can’t be in the file I was concerned about as I have restarted my game but still get the same problem:(

Check mygame.js for any stray symbols you may have accidentally inserted.

@Radontemporum If it’s simply not running then, as @CJW points out, the error is more than likely in mygame.js. If it is at least loading the first page of your game, mygame.js is fine.

If so, then you should be able to tell which scene .txt file the error is in by the very last thing displayed in your game when the error occurs. In brief, it was fine up until that exact point, then something in the very next section after that caused the error. That should give you a good indication which actual file it’s in.

Once you’ve determined which file it’s most likely to be in, look at the line number in that file, which is given in the error message itself. If your browser isn’t giving you the line number in the error message, use FireFox for testing. If your text editor doesn’t allow you to display line numbers in your files, download Notepad++ (it’s free).

If you still can’t find the error after looking at & around the given line number in the suspect file, post the full error message and suspect code here.

I have solved my problem: delete then redownload the file. Thanks for the support.

But for future reference: The error message displayed as soon as I started the game and the full message was “invalid character”.

If occurring that early, that was then almost certainly a problem with mygame.js - e.g. a number or other symbol in a variable name (neither of which is allowed) when the first character it is expecting to see, after the variable name itself, is a colon.

But I’m puzzled why the error message didn’t tell you what the invalid character actually was. Which browser are you using?

Internet Explorer

Hmm. That should be fine, generally speaking.

Best post your entire mygame.js file here, using < pre> before and < /pre> after (but without those spaces after the < ) to retain indentation.

I’ve had that horrible invalid character problem. Check this thread here: http://www.choiceofgames.com/forum/discussion/322/error-in-mygame.js-and-ui.js/#Item_6

It may be that you need to unblock the zipped file before extracting. I had exactly this issue in that it would let me work on a file and all would be fine and dandy and then the next day I couldn’t. Weirdly, it only happened on my laptop with Windows 7 but I had Windows 7 on my desktop and never encountered it. I solved the problem numerous times by downloading the new version of choicescript, but until I unblocked the initial zip file before extraction, the issue kept reappearing.

Due to an extreme case of annoyance at the game I have deleted and redownloaded the choicescript file so my old mygame file no longer exists

Thanks for the advice @bawpie, the unblocking worked.

I’ve never had the problem @bawpie mentions so that explains why it puzzles me! Sounds like it needs adding to the Wiki though.

If you’re starting from scratch, consider reading through the entire Wiki tutorial first – following the Tutorial link at the bottom of each article – as it would certainly help to explain a lot of the basic stuff you really need to know:

@Radontemporum You’re welcome. I understand the frustration caused by this issues. It only seems to occur on some installations of Windows 7 as far as I know, but it’s an odd one nonetheless.

@Vendetta It does seem to be quite a rare issue, but it’s happened enough to warrant mentioning somewhere…the wiki seems as good a place as any!

@bawpie It does indeed. Thankfully @Reaperoa knows about it and has now included this info in two Wiki articles (Setting up ChoiceScript – early in the Tutorial – and the page on specific Error Messages). All’s well that ends well. :slight_smile:

@bawpie Yea, it’s a Win7 problem (I’m assuming Vista too, but IDK for sure). I think it’s part of the whole set of safeties they built into Vista, but I have no idea what causes it to trigger so intermittently. It seems to be a common enough problem, but some mild looks into haven’t really turned up anything about what actually causes it. If you (or anyone else for that matter) figure out how to recreate the error reliably, please do PM me or post it up.

I keep getting “Unable to set value of the property ‘innerHTML’: object is null or undefined” and “the system cannot locate the resource specified” error messages

All i need to publish game is some error fixes

We’ll need a bit more to go on than that, when does it say it? How long has it been saying it? What browser are you using?

If I had to hazard A GUESS, I’d say you’ve broke some of the HTML code in index.html. Try looking in there and make sure all the element attributes preceded by id= are correct.

Index doesnt open in code on my vista

The error shows when i open the index