Variable Problem

I’m having a problem with my stat screen were I declared the variable in startup.txt "create allynumber ‘3’ ", but it didn’t show up in the stats screen when I typed “text allynumber”
it gave an error saying the variable was nonexistent.
my other variables work just fine, this one just refuses to display.
I tried troubleshooting based on the suggested articles, but they were no help…

Did you use ‘3’, 3 or “3” behind the variable allynumber? For as far as I know only 3 or “3” works.

1 Like

when quoting a quote, you have to switch the two, so the code use “3”, also tried 3 though

Ah, ok. Didn’t know that.
Anyway, it’s difficult to figure out what’s going on exactly from just the discription.
Could you post the code?

Can you copy and paste exactly what you’re typing in? Highlighting the code, and then using the </> preformatted text button will allow you to format things as code.

I’ll try to post just what’s relative, it may be better to post the whole, but it’ll be kinda cluttered.

*title Silent Moon
*author Tyler
*create leadership "unknown"
*create Rage "unknown"
*create order 50
*create chaos 50
*create strength "unknown"
*create gender "unknown"
*create pack "false"
*create packnumber "0"
*create undead "false"
*create race "unknown"
*create name "unknown"
*create year "0"
*create month "1"
*create smell "unknown"
*create Generation "1"
*create Fertility "unknown"
*create Adaptation "unknown"

then here is the stats screen, Rage and packnumber are displaying problems, both are newly implemented, all other stats work fine.

*if undead
fertility = 0
    text	Race	
    text	Smell
    text	Leadership
    text	Strength
    text	Fertility
    text	Adaptation
    text	Rage
    text	packnumber
    opposed_pair	Order


Does creating the boolean undead and having “false” in quotes work?

Also, what about fertility = 0? should it not be *set fertility 0?

Also I don’t see any allynumber in what you posted.


Edit: Race and race are different variables. Variables are case sensitive. Do something like “text race Race” if you wish to display it with an uppercase or rename race to Race.

it’s pack number, and I was still working on the undead thing, I’m honestly just going to scarp it’s calculation stats and do it individually with the undead races.
Also, the race stat works perfectly fine.

Have you saved all of the files?

I’m copy/pasting that into the IDE and it’s working fine, so I don’t think the problem’s with your code.

(The opposed pair wasn’t showing but I figured that was a copy/paste error.)

You said you’ve

*create packnumber “3”

Is that somewhere else?

all files were saved, I screwed up so many times during racial programming that I checked for that first.
In the example I changed it to 0, because I was working on implementing other, non-stat features and the errors in stat needed to be avoided, I I removed the packnumber stat and replugged when I was asked for a code sample.

The error’s somewhere else. It’s not in the code you copy/pasted.

I’d say double check the files. Save everything (again). Close it all off. Open up the files. Make sure it’s all in the correct folder.

Can you copy/paste the exact error message you’re getting and where it’s occurring.

I’ll do it when I get back to my pc, I’m not sure why it would be elsewhere since those two stats aren’t mentioned elsewhere in my files.

If I can take the code, paste it into the IDE and have it work perfectly, as is, with no tweaks, it means that the issue’s definitely not with the copy/pasted code.

My guess would be something’s not saved right. (Someone else might have a better idea mind you.) Is it showing any other new things you’ve added.

How are you running the game to test it? Are you using a compiled version?

So it displayed the pack number for you?
I’m running the index file in Firefox.

Yes. If I take the code, as you wrote it and copy/paste it into it works. (Apart from a spacing issue with the last opposed variable).

Hmm…very odd. At least I know I coded the stats right. Just have to figure out why Firefox is telling me otherwise.

So I trashed the undead part, and saved everything and it runs smoothly now…
Thank you for your help both of you, this game is pretty buggy, but I’ll probably have the epilogue done soon.
Fairy, do you mind closing the topic since everything is solved?

1 Like