News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 18th Oct 2003, 02:37 AM   #1
emailer33
Registered User
 
Join Date: May. 23rd, 2002
Posts: 40
UT Replication Trouble

Well i'm trying to make a UT mod, and this is actually my first where I am forced to deal with replication. After reading many articles, i gave it a shot, and am stuck on this problem. The following code works replicating to the client, i checked it with logs and such, but it never can replicate back to teh server thru a different function. Here's some code that i dumbed down to what I have:

What could be causing this not to work? There's no indication of ServerCallBack being run at all.

Code:
enum CheckType {
  CT_Type1 //Only Checktype i have made so far, it's for expansion reasons
};

replication
{
//Functions
   reliable if (Role < ROLE_Authority)
     ServerCallBack;
   reliable if (Role == ROLE_Authority)
     ClientPerform;
}

simulated function ServerCallBack(CheckType CT, string Data)
{
   local private int i;
   if (Role < ROLE_Authority)  return;
   bLog("ServerCallback("$Role$") - CheckType "$int(CT));
   //Here I have some code that processes Data corresponding to CT
}

simulated function ClientPerform(CheckType CT, string Command)
{
  local string Ret;
  if (Role == ROLE_Authority) return;
  bLog("tpBR - ClientPerform("$int(CT)$") - Role:"@Role);
  switch (CT)
  {
  case CT_Type1:
    //Code setting Ret corresponding to CT and Command
    ServerCallBack(CT,Ret);        //Should be replicating back to the server, right?
    break;
  }
}

simulated event PostNetBeginPlay ()
{
  //Some Beginning Code
  bLog("tpBR - PostNetBeginPlay("$Role$")");
  ClientPerform(CT_PackageValidation,SpecialCmd); //This does work and does replicate to the client correctly.
}
Also you can ignore bLog if you're worried about that, i made my own log file. Anyone that can provide any insight it is MUCH appreciated. Thank you.

Last edited by emailer33; 18th Oct 2003 at 02:40 AM.
emailer33 is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer