1.

Solve : Setting 'Type' As A %Type%?

Answer»

Hello, Say i read something from a text file CALLED text.txt.
How would i set this as %text% or whatever.
Example:
Say HP.txt saves your current hitpoints (life)
I then NEED to do something like
set /a HP=%HP%-%Damage%
Where %HP% is the number in the text file.
How would i set the number in the text file to %HP% so i can then do some arithmetic.
Any Help Is Appreciated
If this was text.txt:

Code: [Select]10
Then it could be read like this:

set /p health=<"C:\documents and settings\%username%\desktop\text.txt"

Try that.If you have more that txt files i have better idea. You can echo all those variables into one file ex. Code: [Select]10 50 5will be Code: [Select]health SCORE level then you can MAKE sth like thisCode: [Select] for /f %%a in (file) do (
set health=%%a
set score=%%b
set level=%%c
) Thank you both, i feel that although devcom, your issue is more practical, i feel that dudeoxide is more simpler and works better for me, once again, thank you both.No problem.

How's the game coming along?Quote from: Carbon Dudeoxide on July 08, 2008, 02:28:02 PM

No problem.

How's the game coming along?
kinda stopped making it really.
haven't had time.Quote from: Carbon Dudeoxide on July 09, 2008, 12:46:19 PM

Yeh
That's life.


Discussion

No Comment Found