Need Help Declaring Variables


#1

Hello, i am new and was just getting use to the old CS but then i decided to download the newer version and now i need help declaring variables.

Before we had to declare it in mygame.js but now i heard its different.

So how do i declare variables?

For me i need to declare the players name, pets name, and some skills

For skills in the stats screen i need to declare Evil and Kindness.

Can anyone help me?


#2

You can still use the old version. I am with no issues.


#3

@ADNox

Really? i seem to be having trouble with it.

How do we do it in the new version?


#4

No idea. I just list the variables in mygame.js. I have about fifty variables so far, mostly hidden ones to track MC decisions, and no problem. Then again, I don’t have the latest version of CS. I have the one right before it.


#5

hahah yeah i had the version just before the new one and got used to it… then updated it… and yeah now i am lost hahaha…


#6

how did you do it in mygame.js again? i think i will try declare it in there and see if it works


#7

Check the mygame.js section of the Wiki. It’s for that version.


#8

ok, thanks :slight_smile: if anyone knows how to do it in the newer version, please let me know :slight_smile: thanks


#9

Declaring variables in the latest update is intended to be done in startup.txt, though I believe you could still do it in mygame.js.

In theory - I haven’t really switched over yet either - it should look like this.

startup.txt


*create varnum 123
*create varstrin "One Hundred Twenty-Three"
*create varboo false

and having just noticing what variables you wanted:


*create name "J. Doe"
*create pet "Bingo"
*create moral 50

BASICALLY, the new version consolidates *create, which has been undeprecated, and *set by having you declare a value when you create a variable.


#10

I switched to the latest. Still use mygame.js to declair my variables. I did have a problem at first. I started building my list of variables as I normally would, but they did not seem to work. That was until I realized that the ]} had to be moved down and all my variables placed inside of it. Then no problems. Lol


#11

Ok lol :slight_smile: it has been fixed :slight_smile: thanks guys


#12

That was the issue?


#13

oh no, i fixed it by just doing it with mygame.js file… Since i did it, i dont need not need assistance right now… :slight_smile: thanks :slight_smile: