Monday 13 January 2014

Game launcher in batch error help please

Posted by Саша 23:31, under | No comments


Game launcher in batch error. help please.? Game launcher in batch error. help please.?

i am making a game......... i am making the launcher for it with batch. i want it to compare a premade file to a temporary file made when logging in but even if i get everything right, it still says that the password or username is incorrect. here is the source-code.

setup file - setup.bat

echo off
color f0
title setup - launcher for DFST
cls
::------------------------------------...
::account setup
:name
set INPUT=
set /P INPUT=enter your name (E.G. John Smith): %=%
pause
echo %INPUT% >>userinfo.txt
goto dob
:dob
set INPUT=
set /P INPUT=enter date of birth (dd/mm/yyyy): %=%
pause
echo %INPUT% >>userinfo.txt
goto mail
:mail
set INPUT=
set /P INPUT=enter email address (E.G. testemail@test.com): %=%
pause
cls
echo %INPUT% >>userinfo.txt
goto user
::------------------------------------...

---
:user
set INPUT=
set /P INPUT=enter username: %=%
echo Your input was: %INPUT%
echo %INPUT% >>userpass.txt
goto pass
::------------------------------------...
:pass
set INPUT=
set /P INPUT=enter password: %=%
echo Your input was: %INPUT%
pause
echo %INPUT% >>userpass.txt
echo serial - 000 %random% >>userinfo.txt
goto end
::------------------------------------...
:end
echo please press D to the following messages
xcopy userinfo.txt userinfo
xcopy userpass.txt userinfo
cls
echo thank you for configuring your user info for the launcher
echo your status will update within 1 week if you email me the files in the userinfo folder (online only)
echo you will be able to log into the game before your status updates.
pause
cls
start launcher.bat
exit

launcher.bat - where the error is

echo off
color 8f
title DFST launcher
cls
::------------------------------------...
:home
cls
echo launcher version 1.0
echo ----------------------
echo updates:
echo.
echo indev 1.0.0
echo created level 1
echo ----------------------
echo.
echo type options or login
echo.
set/p "cho=>"
if %cho%==options goto op
if %cho%==OPTIONS goto op
if %cho%==login goto log
if %cho%==LOGIN goto log
if not %cho%==options exit
if not %cho%==OPTIONS exit
if not %cho%==login exit
if not %cho%==LOGIN exit
::------------------------------------...
:op
cls
echo game version - 1.0.0 indev
echo launcher version - 1.1
echo would you like to check for updates? (Y/N)
set/p "cho=>"
if %cho%==Y goto a
if %cho%==y goto a
if %cho%==n goto home
if %cho%==N goto home
if NOT %cho%==Y goto home
if NOT %cho%==y goto home
::------------------------------------...
:a
echo checking for update data...
echo (#####################)
ping 192.168.0.1
cls
echo no data
pause
goto op
::------------------------------------...
:log
set INPUT=
set /P INPUT=enter username: %=%
echo %INPUT% >>temp.txt
goto entpass
::------------------------------------...
:entpass
set INPUT=
set /P INPUT=enter password: %=%
echo %INPUT% >>temp.txt
goto signin
::------------------------------------...
:crash
cls
echo this is from the indev tests. it is a function i forgot to remove. it triggers if there is an error with the coding. i am sorry for the error.
pause
goto home
::------------------------------------...
:fail
cls
echo you entered an incorrect username or password.
pause
cls
del temp.txt
goto home
::------------------------------------...
:signin
echo logging in. please wait.
pause
fc /u userinfo.txt temp.txt
if errorlevel = 1 goto fail
if errorlevel = 0 goto win
::------------------------------------...
:win
Ping localhost -n 3 >NUL
echo loading
echo done
echo starting game
start a_game_file.ppt
cls
del temp.txt
exit


i have tried several things to make it work but i don't know what i am doing wrong. please help.
thanks in advance
acepilot112 :)

also feedback on the launcher and stuff so far would be nice














0 коммент.:

Post a Comment