Help on running my game!


#1

okay, so im new here and after playing zombie exodus, im very interested in MCGs! ive been doing my research and have already got almost 100 lines coded for my new story idea (a story stemming from a desolate world directly after a nuclear fallout, with your young child as the only person you can trust), but im running into problems now because im not sure how to run the program… Ive just been saving it as “startup” and running it under the “my very first game” as the introduction to choicescript file suggested, but that wont change the stats page to my specifications… I tried changing mygame.js but it still says syntax error when i run the index. This is probably a simple mistake that im overlooking, but if anyone could help I would greatly appreciate it!
:slight_smile: thanks so much


#2

the stats are stored in the file choicescript_stats.txt to be displayed in game (like in Zombie Exodus, when you hit the stats button).

mygame.js is where you set the stats that are used in choicescript_stats.


#3

so I copy this into choicescript_stats? what is the purpose of mygame.js then?
stats = {
intelligence: 0
,charisma: 0
,strength: 0
,marksmanship: 0
,stealth: 0
};


#4

slightly different formatting. Here is how choicescript_stats looks for my game:

`
Zombie Exodus Stat Page

*stat_chart
text name
text surname
text profession
text gender
text Part

`

so yours would look like:

`
*stat_chart
text name
text intelligence
text charisma
text strength
text marksmanship
text stealth

`

You could also present the numbers graphically using:
percent charisma
percent strength
etc.


#5

okay i changed my choicescript_stats to:
*stat_chart text gender text child_gender text name text child_name text intelligence text charisma text strength text marksmanship text morality text health text wealth
but it still says syntax error when i open the index :confused: is it because i changed the mygame.js?
btw thanks so much for your help, and i love your game!


#6

oh got it! just found the choiceofgames instructions on customizing stats! :stuck_out_tongue: okay haha ill try to figure it out when i get home from school tomorrow, im sure ill soon have more questions :slight_smile: thanks again!


#7

`*stat_chart
text name
text child_name
text gender
text child_gender

*stat_chart
text inventory

*stat_chart
percent intelligence
Your ability to deal with situations without the use of brute force
percent charisma
Your effect on others to deal with situations
percent strength
Your physical strength, which determines the outcome of melee situations
percent marksmanship
Your accuracy and effectiveness with a firearm in ranged situations

*stat_chart
text morality
text health
text wealth`

i got my own story working now, but im getting a “FileName” error when i open the stats page, can you help me find the error above? thanks


#8

First, test your game in Internet Explorer, if at all possible, as error messages are not returned correctly with other browsers, and having the ‘correct’ error message makes thing significantly easier to debug. Second, when giving errors, please copy as much as the error as you can. In particular the error message will point out which line in which scene is causing the error. It makes finding the source of the problem significantly easier.

As for a guess to what the error actually is, I think the description lines (under your third *stat_chart) need to be indented another tab. If that’s not causing it, can I ask if you have changed the name of the stats page txt? (I don’t recall ever having a ‘FileName’ error so I can’t recall what exactly it is.)


#9

the description lines are indented, not sure why its not showing up that way.
But thank you so much for the information about internet explorer, that helps a ton!!! the error im getting in explorer is " line 2: Non-existent variable ‘name’ " i followed the instructions on choiceofgames, not sure how to fix that


#10

Is the variable ’ name’ defined in your my game.js file?


#11

I’m guessing that you still need to set all your variables in the mygame.js file?

e.g.
stats = { name: "Unknown" ,child_name: "Unknown" ,gender: "Male"


#12

okay yes, yes that would help :stuck_out_tongue: do i set gender to “unknown” for now then too?
then when i want to add say a child gender i put
*set child_gender “boy”

then if i was setting name i would put
*input_text name
where ${name} represents the selected name?

thank you so much


#13

Yep, no reason why it shouldn’t be “unknown” to begin with too–I just typed a gender in the example to indicate that a text variable doesn’t necessarily have to be “unknown” at the start. You can have whatever you like in there (I even use a few as “” --i.e. blank-- just so I can use emphasized titles on my stats screen . . . but I’m strange like that!).

Your intended use of the name variable looks fine to me.


#14

thanks! thats actually a really good idea, i think i will leave it blank in the beginning, because its just weird to have an unknown gender :stuck_out_tongue:
wow, apparently im terrible at this because i can go for like 20 minutes before i run into an error… but this time it doesnt give me a line to fix, all it says is “the system cannot locate the resource specified” this is on a completely new zip file i downloaded because i wanted to try making an easier game to start out with first
ugh! any suggestions? i dont think its a problem in the text because it doesnt say a line!


#15

20 minutes? Try 20 seconds . . . I’m forever forgetting to update something else and having to go find it. It’s all a learning experience. :slight_smile:

I’ve never had that particular error you mentioned so I can’t help you there, sorry. No doubt somebody with much more experience will be along within the next few hours.

One good tip I read somewhere which certainly helped me restart a project without having to download anything again–don’t edit the “mygame” folder at all, simply copy it and name the new one accordingly, then use the new one for your game. This leaves you with an untouched copy of all the example game files you’re about to mess with.


#16

haha ya thats definitely true :slight_smile: i think of ideas all day at school, but get stuck as soon as i get home!
Ya thanks again, and i also sent an email to choice of games, they should be able to help :slight_smile:
and if anyone else knows, it would be greatly appreciated!


#17

finally figured it out…had to change my scene from startup to what i named it in mygame.js
wow haha i tried a million things before i thought of that :stuck_out_tongue:


#18

Another tip that may help you a bit, is after working on a portion of your code try running the autotest utility on it real quick. I’ve found this makes dealing with the mistakes I make easier to find and correct. Good luck!


#19

Heh, now when I read your error again, it sounds so obvious . . . Hindsight is a wonderful thing. :slight_smile:


#20

okay will do Rob :slight_smile: thanks!
Okay so im getting some good work done on my new project (about being alone in the wilderness of Alaska) but i have a question
I need to have some sort of incentive for people to get things done faster, so say if they have a canoe, they can cross the lake in .2 days, whereas if they need to walk, it will be .5 days
and im thinking of limiting the days to 31 or something, so the goal is to get the most accomplished in your month in alaska, but would that be possible to do?
So if you walked around the lake, would i just say *set time +.5
then on every slide say
*if time > 30.9 *goto ending