Script seems to be changing Variable numbers to text

I have a variable that is either set to 0 or 1. But when I used an item that uses a common event script, that 0 or 1 is changed to text. Is there a way around this?
we can't help without seeing how you used the variable

variables are extremely versatile and can be used in many ways - that is both their strength and their weakness. And we can't help without the details and context of your variable
removed
no, you didn't understand.

all event commands have protections around them, and one of those protections is that the game variables are ALWAYS integers.
It takes specific steps through script commands to get the variables to even accept a text as a value, and those steps CANNOT happen through a simple common event.

There are a number of ways how that could happen, from defective scripts/plugins to other failures - but to find out which of those is the case in your project, we need screenshots of what you did with the variables and what they now contain and so on.
removed
No, I didn't see the edit until now.

But now I don't understand what the problem is.
You specifically tell the variable to store the text, and then of course the stored text is displayed as the content of the variable.
if you don't want the variable to contain text, then don't store that text there in your script command.

so what is your problem with this?
removed
that is one reason why we tell people that all plugins need to be configured: to make sure that any assigned variable isn't use somewhere else.
and plugins are nothing but scripts in a special container, so the same rule applies to script snippets as well:
always make sure that they are configured correctly and are using the correct IDs for whatever they do.
I have a few questions that might help us solve this.

1. Is this still an issue for you, or did you fix it?
2. Is this is a "Script" within an Common Event, and looks something like the following image?
1608182409937.png

3. Once the number goes through the "Script" in this CE, it becomes a string instead of an integer, yes?
4. Is it actually a problem to have a string instead of an integer being output from this script?
5. Are you absolutely sure that it's an integer prior to being used in the script?

Original thread: https://forums.rpgmakerweb.com/threads/script-seems-to-be-changing-variable-numbers-to-text.131087/