Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

got problem with my shelf made loader

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
well i made a little game loader for my little server but when other ppl try to execute it they get a error..

it dont matter what the error says, i have read all around forums and i have seen many ppl have the same problem..

it also works perfect on my comp but if i move it to another it only comes a error..



win32 console application --->

#include
"stdafx.h"
#include <conio.h>
#include <process.h>
#include <iostream>
int main()
{
system(
"engine.exe /load /config debug");
return 0;
}

and i use visual studio 2008 pro

i dont think there is many ppl that know anything about c++ here but i take a chance....

anyone got "fix" for this?

 
Experienced Elementalist
Joined
Dec 27, 2006
Messages
288
Reaction score
4
Simply put, you're building it wrong. You're probably building it in debug mode (which will only run on a computer with visual studio installed).
 
Upvote 0
Experienced Elementalist
Joined
Dec 27, 2006
Messages
288
Reaction score
4
so how to make it in "NOT DEBUG" mode?

First of all go into your project settings. Near the top it should have "Configuration: <drop down box here with Debug>". Click it and select Release. Next go to Configuration Properties -> C/C++ -> Code Generation and change Runtime Library to Multi-threaded (/MT). Apply, then click Configuration Manager near the top right of the window, a new window opens. Under the configuration column, change it from Debug to Release. Close the window, click OK in the properties window and you're ready to build a release version.
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
First of all go into your project settings. Near the top it should have "Configuration: <drop down box here with Debug>". Click it and select Release. Next go to Configuration Properties -> C/C++ -> Code Generation and change Runtime Library to Multi-threaded (/MT). Apply, then click Configuration Manager near the top right of the window, a new window opens. Under the configuration column, change it from Debug to Release. Close the window, click OK in the properties window and you're ready to build a release version.


i did not find the "project settings" but all seem to work anyways.. thanks
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
so is all my projects going to be "release" automatic now or must i do the same every time?
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
well if i remember to do it everytime ;P

thank you very much :p
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
hmm... now ppl can execute it but it dont launch the game they just see a black windows for 1 sec...



EDIT: i found out what my problem was, my friends was not able to execute becuse it was packed with yp... but i dont want it unpacked :S

maybe should try an other compressor..
 
Upvote 0
Experienced Elementalist
Joined
Dec 27, 2006
Messages
288
Reaction score
4
hmm... now ppl can execute it but it dont launch the game they just see a black windows for 1 sec...



EDIT: i found out what my problem was, my friends was not able to execute becuse it was packed with yp... but i dont want it unpacked :S

maybe should try an other compressor..

Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

int main()
{
	TCHAR cmndln[]  = {
		'/', 'l', 'o', 'a', 'd', ' ', 
		'/', 'c', 'o', 'n', 'f', 'i', 'g', ' ', 
		'd', 'e', 'b', 'u', 'g'
	};

	STARTUPINFO startinfo;
	PROCESS_INFORMATION procinfo;

	SecureZeroMemory(&startinfo, sizeof(startinfo));
	SecureZeroMemory(&procinfo, sizeof(procinfo));

	startinfo.cb = sizeof(startinfo);

	CreateProcess(TEXT("engine.exe"), cmndln, NULL, NULL, FALSE, 0, NULL, NULL, &startinfo, &procinfo);

	return 0;
}

Quite an ugly way to do it, but I guess it's easy and makes things ~less obvious.
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
 
int main()
{
    TCHAR cmndln[]  = {
        '/', 'l', 'o', 'a', 'd', ' ', 
        '/', 'c', 'o', 'n', 'f', 'i', 'g', ' ', 
        'd', 'e', 'b', 'u', 'g'
    };
 
    STARTUPINFO startinfo;
    PROCESS_INFORMATION procinfo;
 
    SecureZeroMemory(&startinfo, sizeof(startinfo));
    SecureZeroMemory(&procinfo, sizeof(procinfo));
 
    startinfo.cb = sizeof(startinfo);
 
    CreateProcess(TEXT("engine.exe"), cmndln, NULL, NULL, FALSE, 0, NULL, NULL, &startinfo, &procinfo);
 
    return 0;
}

Quite an ugly way to do it, but I guess it's easy and makes things ~less obvious.


i get the message: "can't execute this program alone...." :p



does:

SecureZeroMemory(&startinfo, sizeof(startinfo));
SecureZeroMemory(&procinfo, sizeof(procinfo));

"secure, hide" memory parts?
 
Upvote 0
Experienced Elementalist
Joined
Dec 27, 2006
Messages
288
Reaction score
4
i get the message: "can't execute this program alone...." :p



does:

SecureZeroMemory(&startinfo, sizeof(startinfo));
SecureZeroMemory(&procinfo, sizeof(procinfo));

"secure, hide" memory parts?

I think you get that message because you didn't put in the correct command line. I assume you've changed things in your engine or so, so you have to edit the cmndln array to reflect those changes respectively. Currently it is:
/load /config debug

SecureZeroMemory simply makes sure the data is all set to zero.
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
got it working..

your..

{
TCHAR cmndln[] = {
'/', 'l', 'o', 'a', 'd', ' ',
'/', 'c', 'o', 'n', 'f', 'i', 'g', ' ',
'd', 'e', 'b', 'u', 'g'
};

my :p
{
TCHAR cmndln[] = {
' ', '/', 'l', 'o', 'a', 'd', ' ',
'/', 'c', 'o', 'n', 'f', 'i', 'g', ' ',
'd', 'e', 'b', 'u', 'g'
};
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
:p well anyways thanks for helping.. again :p

i come back later if i found more problems :p
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
you maybe think that im strenuous now :p but i dont see any servers in the server list,

i changed debug to my "command" but dont work... i even tried alot of other "commands" but it still wont work...
 
Upvote 0

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
can i make like this:

Code:
	TCHAR cmndln[]  = {"/load /config debug"};

??

EDIT: well maybe not... it gives me a error:
Code:
error C2440: 'initializing' : cannot convert from 'const char [20]' to 'TCHAR'


maybe shuld try anything else than "TCHAR"??
 
Upvote 0
the Insane
Joined
Aug 23, 2007
Messages
229
Reaction score
13
ok ive had another go at it and managed to make a loader.exe that loads config debug
it works on the int client but not on mine
on mine it fails to load debug , it loads the engine and config but no server name loads
where if i load it with the usual loader.bat i see no problem

any1 got any idea why?

.EDIT.

done it now...

= loader.exe - visualstudio project file

need to put..
Code:
;(country_type ENG)
;
;	Server List
;


(serverlist(name "svrname")(IP "127.0.0.1")( PORT "30000")(config "debug" "test2")(servernumber 1))
in xlate and...
Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

int main()
{
    TCHAR cmndln[]  = {
		' ', '/', 'l', 'o', 'a', 'd', ' ', 
		'/', 'c', 'o', 'n', 'f', 'i', 'g', ' ',
		'd', 'e', 'b', 'u', 'g', ' ', 't', 'e', 's', 't', '2'
	};
 
    STARTUPINFO startinfo;
    PROCESS_INFORMATION procinfo;
 
    SecureZeroMemory(&startinfo, sizeof(startinfo));
    SecureZeroMemory(&procinfo, sizeof(procinfo));
 
    startinfo.cb = sizeof(startinfo);
 
    CreateProcess(TEXT("engine.exe"), cmndln, NULL, NULL, FALSE, 0, NULL, NULL, &startinfo, &procinfo);
 
    return 0;
}
 
Upvote 0
Back
Top