Jump to content

iShady

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Operating System
    Windows 7 Ultimate on MAC OSX BOOTCAMP

iShady's Achievements

  1. Hello everyone, I dont usually have a lot of time to work on my mod for jk2 but i had some time today and im stuck at a problem that i also faced last weekend and couldnt solve. Ive been told that there might not be any reasons for this code not to work but im here hoping that maybe one of you has a suggestion or an alternative method for me to try. Im currently stuck with transferring over my "userlogged" session between map changes, im going to display some of the code Im using and maybe you can help? in g_local.h in the clientSession_t struct i have declared userlogged; char userlogged[MAX_STRING_CHARS]; in g_cmds.c where i have my login function, i copy over the "name" char to the userlogged char. (name= name of userfile being opened). Q_strncpyz(ent->client->sess.userlogged, name, sizeof(ent->client->sess.userlogged)); then in g_session.c under g_writesessiondata i call on userlogged seperately from the integer based sessions. var = va( "username%i", client - level.clients );trap_Cvar_Set( var, client->sess.userlogged ); in the next section g_readsessiondata i call on it again; var = va( "username%i", client - level.clients );trap_Cvar_VariableStringBuffer( var, s, sizeof(s) );Q_strncpyz( client->sess.userlogged, s, sizeof(client->sess.userlogged) ); This is basically everything that involves setting a value to userlogged and carrying it over. I made a small command in game that checks the string and displays it so I know that when I login the name of the file (shady.cfg) is properly assigned to the userlogged session. So why is this not working?
×
×
  • Create New...