Having some problems on the status system

Hello, I’m new here and have a lot of questions about CSIDE programming language as I myself am not taking the computing class so I don’t know a lot about any program language.

I’m having trouble with a my status system

The error I’m getting is: it’s not an error, the CSIDE does not check my *set hp which I put at startup.txt and as my story goes the *set hp might increases, but it does not check

Do I have to manually input every *set hp on every chapter or is there any easier way to do it?

My code looks like this:


*create strength 11
*create constitution 11
*create maxhp 0
*create currenthp 0
*create hp 0
*create edmg 0
*set maxhp ((strength * 2) + (constitution * 10))
*set currenthp (maxhp - edmg)
*set hp ((currenthp / maxhp) * 100)


text strength STR
text constitution CON

Here is Your Health and Mana
text currenthp HP
percent hp HP

This will just be my first questions on the CS programming language, there will be a next and a next and so on…

Thanks a lot :pray:

Edit: I forgot to put the *create hp and his friends on this post, I did put them in my startup.txt ,sorry

Welcome! Looks like you need to create the hp variable before the first time it’s set

I’m not quite understanding the problem you’re having–are your variables (strength and constitution) not showing up on the stats page?

To answer this question–every time there you want there to be a change to a variable, yes you have to make that change in the code. If you want to do this often, you might want to consider writing a subroutine that you can recall multiple times

SpokesWriter is correct–and if you haven’t *creeated “maxhp” and “currenthp,” then you need to do that too before you can change their values with operators

1 Like

Thank you! I just edited my post
I did put the *create hp and its friends before the *set hp

No, the variables text currenthp HP does not get updated as my stories goes on
So, do I need to put the *set currenthp at every chaper if it got updated or is there any easier way to do it?

I’m afraid there’s no easier way to do it. If you want a variable to change, you have to change it. The code is dumb and will only do what you tell it to do


I see, I thought the code will just read itself and runs by itself if sometimes they got updated.
Thx for the answer, it helps me a lot :pray:
Maybe I will just put a subroutine so I don’t have to do it all the time :joy:


This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.