Greetings from Italy, new really noob user needs help


#1

Hello People,

I enjoyed imprisoned, downloaded for my iphone, i’d like to make one game by myself. A simple one in terms of code, but complex in term of drama. I downloaded the suorce code and give a look to the script. Itself, seems very simple, but when i go to the editor i don’t understand nothing. I’d like to make one simple page, easy to read, without stats or anything, but only the story growing in the way the user decides.
The best for me is to have 1 file to edit, open the index and start the game, for now, when i open the folders i downloaded, i don’t understand so much, or when i try to edit the existing files i find always the stats window and the disclaimer on the bottom.

Please help me

Thank you


#2

Welcome to the forum!

To start out, you want to go to the ‘web’ folder, then copy the ‘mygame’ folder.
Rename the copied ‘mygame’ folder to the working title of your game.
Go into the ‘scenes’ folder and delete everything but choicescript_stats.txt.
Make a new .txt document in the ‘scenes’ folder and start writing your game!

Hope this helps.


#3

A couple of points:

I *think* the game always looks for a file named “startup” to start with, so I’d call the file for your game “startup.txt”

You can delete the *contents* of choicescript_stats.txt just fine, or replace it with a note saying “this game doesn’t use stats”. Removing the button involves editing the index file.


#4

@DanH

The starting file for my game is beginning.txt and it works just fine, so it doesn’t appear to matter, but startup.txt could be convenient anyhow because you wouldn’t have to go into the .js editor for scene lineup until you started your next scene.

And I can’t believe I missed your second point. Thanks for catching that!


#5

Yeah, it was not having to edit Mygame.js that I was really talking about, since if you just delete the starting scene and don’t tell the game what to start with it will, I think, get horribly confused.


#6

Hi, I know this thread is old, but after following these directions and naming my file startup.txt I keep getting a permission denied. How can I fix this?


#7

I’ll try to help you monkey, but I warn you that I’m pretty stupid.

First of all, exactly what message do you get? Does it say something like this?:
Couldn’t load URL: scenes/animal.txt [Exception… “Access to restricted URI denied”

Also, when does it say permission is denied? Immediately when you start the game or after at least one button click?

I’m going to go ahead and guess that you got an error message like what I put above, and that your first scene, startup, ends really soon. If so, then the game doesn’t have anywhere to go next. The way it’s set up when you download it, the next notepad thing it tries to read is animal.txt. Using the “*finish” command too early can do that. Maybe you are ending all your #choice options with a “*finish”? As far as I can tell, the only way to get out of #choice things without changing scenes is to use the “*goto” and “*label” commands. I say this because I ran into the same issue, sort of, when I started recently. Note that just using label and goto can make your stuff ugly, hard to read, and prone to coding mistakes. Use nested "#choice"s too, and by nested #choice I mean a #choice that, like *finish and *goto, lies inside of some other #choice. Choice-ception.

If it immediately gives the error message when you start the game, then it probably isn’t finding a startup.txt notepad document in your scenes folder, but I’m pretty sure you have one there from what you said.

Keep in mind that I have no idea what I am talking about, as I am new too, but it should be at least easier for smarter people to figure out what’s wrong if we can get the exact error message and stuff. If worse comes to worst, you can just put your game into a zip file and let someone download and look at it.


#8

Sorry for being so vague.
If I load from mygame.js error is:

Script:
C:\Usere\Desktop\dfabulich-choicescript-4140592\dfabulich-choicescript-4140592\web\stranded\mygame.js
Line: 23
Char: 1
Error: ‘Scene Navigator’ is undefined
Code: 800A1391
Source: Microsoft JScript runtime error
line 23 1st character is a space but i checked how it lined up…
I have no “scene navigator” variable

If I load from index by the scenes folder error is:
Message from website
Permission denied

If I load from index in web folder it loads forever.

I will post the beginnings of my code below.
*create occupation
*create band name

You wake up completely wet with the taste of salt water in your eyes. The sun glares off the white sandy beaches around you.
*line_break
Wait, beaches?
*line_break
As your memory clears, you begin to remember the events of the previous night.
*page_break

You remember boarding a very large boat. You were there…
*choice
#to perform.
Your band was entertainment for the cruise.
*goto rock
#to cook.
Your cusine and artistic talent in the kitchen is world renowned.
*finish
#on vacation. A well deserved one at that.
*finish
#to meet for a medical seminar. As a doctor you want to keep up to date on the latest medical practices.
*finish
#to steer the boat.
As the captain of the ship, it’s your job to get this ship to its destination.
*finish

*label rock
Your band was entertainment for the cruise.
*line_break
By the way what instrument do you play?
*choice
#drums.
*set occupation “drummer”
#guitar.
*set occupation “guitarist”
#triangle.
*set occupation “SOHCAHTOA”
#I’m the lead vocalist.
*set occupation “singer”
Awesome! What’s the name of your band?
*input_text band name
*finish

Thanks for your help.


#9

Well, that’s weird. This seems to work for me, though I had to add spacing. I don’t know if the spacing was removed when you posted your message, but in case it wasn’t, you need to put some consistent indentation for everything nested in something else. #drums is nested in *choice, so you need to have some consistent nest-spacing there. *set occupation is also nested in #drums, so it gets even more spacing.

Anyway, you don’t play your game with the mygame.js, and the only index that will work is the one in the same folder as your mygame.js and scenes folder. First make sure you have the following setup:
1.Main folder
2.In main folder, you have mygame.js, index, and scenes folder
3.In scenes folder, you have startup.txt
Then cry because I have no idea what the problem is. Do you know if the regular, unedited mygame that you downloaded has the same issue when you try to run it using its index? If so, then there’s probably something wrong with how the computer is doing stuff. Googling “Message from website permission denied” comes up with a few results, including some from support.microsoft.com. There’s also this: http://answers.microsoft.com/en-us/ie/forum/ie8-windows_7/message-permission-denied-the-page-still-loads-but/ea820ac8-236e-452f-b4db-6e151ccddbad. If you know that the regular mygame runs right, then there is probably something wrong with how the game is set up. If everything is arranged like above and you made changes to the mygame.js, then you might want to replace it with an unedited version of the mygame.js that comes with the download. I tried messing around with my mygame.js, deleting random stuff, but never got the permission denied error, so I don’t really think this is the issue.

Other error messages you might get once you fix this problem:

You can’t use variables with spaces in them. When the current issue is fixed, you should start getting an error message about that, so it might be worth renaming “band name” as band_name or bandname.

The instrument-playing choice doesn’t have a *finish or *goto in any of its options. They will all make the game crash unless you add something like a *goto nameband.

I look forward to your completed game, and don’t worry about these technical issues. I’m under the impression that everyone runs into difficulties when they start choicescript. Plus, this is probably a really simple problem that I’m over-thinking. Hope what I said helped.


#10

I think the spacing got messed up when copied out.
I will try fixing the folders and re downloading everything in the morning.
Thanks for the pointers. I think I’m just trying to figure out the format which isn’t much different spacing wise from html.
I’m looking forward to this game too and will probably get a lot done over the break. Thanks


#11

Ok, I re downloaded. I then removed the extra files in scenes folder except the choicescript_stats file. Then I moved the file with code for the game named startup.txt into the scenes folder. Then after checking spacing and whatnot I loaded my game from the index next to the scenes folder. I am still getting a permission denied.

I got rid of all stat options for now to simplify it but I am planning to add them back in later.
Before I deleted the contents of scenes folder I ran the game through index and they worked just fine.

This is frustrating because I don’t want to code much more game until I figure out how to load it.

Thanks for your help.
BTW the URL you posted won’t load.


#12

New develpment: when I turned on -display a notification about every script error- under advanced internet options I got this error message.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Timestamp: Sun, 11 Dec 2011 14:58:55 UTC

Message: Permission denied
Line: 189
Char: 5
Code: 0
URI: file:///C:/Users/Madison/Desktop/dfabulich-choicescript-4140592/dfabulich-choicescript-4140592/web/scene.js

I have no line 189.


#13

I think scene.js has a line 189. You just don’t see it because you can’t see it. Anyway, I’m happy to hear that the game ran when you made no changes - it means the link I gave that was broken is completely useless, and this should be a lot easier to fix.

Is the displayed name for your startup.txt in the scenes folder “startup” or “startup.txt”? If it’s startup.txt, then it is saved on the computer as startup.txt.txt. Of course this doesn’t give me the same error message as it gives you, but its the only thing I can think of at this point. If it is a notepad document, it automatically has a .txt at the end. If this doesn’t work, I’m tempted to ask you to download it for a ninth time, but without deleting a thing, and then pasting the text from your game into the startup.txt and seeing if it runs.


#14

I copied my code into the original startup and now its working. Not reallys sure what the problem was though because the file name was startup with an automatically added .txt. Thanks for your help now I can get started and test it as I go.


#15

Hey thanks for all your help I managed to type a whole scene tonight. From when you wake up on the island to flashing back and then how you ended up there.


#16

Sorry, but can you edit the mygame.js file at all (as in right click > Open With > Whatever text editor you use)?


#17

Yep I could but its all fixed and working now. I started a webs.com page and should have something to put up when it lets me upload stuff in a week.