For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

Internet + Mod = Strange problem. Help please?

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
User avatar
Cheese
OldUnreal Member
Posts: 24
Joined: Tue May 22, 2007 11:38 pm

Internet + Mod = Strange problem. Help please?

Post by Cheese »

The code:

Code: Select all


struct Shop                        // ITEM SHOP
{
var() config string Item;      // Items you can purchase
var() config float Cost;      // Cost of those items
};

var() config Shop List[100];


replication
{
reliable if (role < role_authority) Buy;      // Send the 'Buy' function to the server

// vvvvvvv PROBLEM!!!!!! vvvvvvv
reliable if(role == role_authority && bNetOwner) List;      // Send the Item List to the owner. 
 // ^^^^^^ PROBLEM!!!!!! ^^^^^^^

}

The problem:

As soon as I summon this actor ( A pickup, to be precise) I get this crash:
Critical: appError called:
Critical: Assertion failed: !Bunch.IsError() [File:M:\Unreal224\Engine\Src\UnChan.cpp] [Line: 1080]
Critical: Windows GetLastError: A non-blocking socket operation could not be completed immediately. (10035)
Exit: Executing UObject::StaticShutdownAfterError
Critical: ReplicateProperties
Critical: UActorChannel::ReplicateActor
Critical: UpdateRelevant
Critical: ULevel::ServerTickClient
Critical: ULevel::TickNetServer
Critical: UpdateNetServer
Critical: ULevel::Tick
Critical: (NetMode=1)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: MainLoop
Exit: appExit
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 01/06/08 09:26:57
  • The version is 225f.
  • The crash doesn't happen until I actually pick up the item.
  • The item's remoterole is SimulatedProxy;
  • bNetTemporary is false. (for obvious reasons).
  • Changing the replication statement to:

    Code: Select all

     reliable if(role == role_authority) List;        
  • will crash the serverimmediately when the item is spawned (because it has to replicate to all the clients then).
  • Removing the replication statement for 'List' will make the item Not crash the server, but 'List' will not be replicated,
    therefore the item will be useless (you won't be able to purchase anything, because the items/cost aren't replicated to the client).
This means there's obviously something that's screwing up somewhere between the server and the client with this.

The log is telling me that "A non-blocking socket operation could not be completed immediately".
I've tried and failed to solve this, but I have no clue how to fix the problem.

It could be possible by having a temp variable that is replicated and sends each value separately, but that might bog down the server, and would just be a pain in the ass to do.

So does anyone have an idea why the crash is caused? And how I can fix it (with the item still usable)? Any help is appreciated.
Last edited by Cheese on Sun Jan 06, 2008 8:16 pm, edited 1 time in total.
Currently lurking...
fxsr789

Re: Internet + Mod = Strange problem. Help please?

Post by fxsr789 »

Wow wth, yet another thing Sweeny screwed up.

- Fenix
User avatar
mentalhunter
OldUnreal Member
Posts: 814
Joined: Sun Oct 07, 2007 10:31 am

Re: Internet + Mod = Strange problem. Help please?

Post by mentalhunter »

I posted this to, yesterday i think. I think 227 mods are incompatible with older versions, can that be fixed or is it clearly impossible?
User avatar
Zombie
Administrator
Posts: 322
Joined: Thu May 09, 2002 11:44 pm

Re: Internet + Mod = Strange problem. Help please?

Post by Zombie »

The following reference page and quote may have relevance to Cheese's problem.
http://unreal.epicgames.com/Network.htm
* General structs are replicated by sending all of their components. A struct is sent as an "all or nothing" type of thing.
* Arrays of variables can be replicated, but only of the size of the array (in bytes) is less than 448 bytes.
You might need to reduce the array size to 32 for safety. Also, try without using a replicated array struct if you're willing to change it. Use separate replicated arrays for item and cost or to be clever, combine the information using delimiters into one replicated string array. That could be done while still keeping a struct config on the server if wanted.

A different method would be to use replicated functions instead. Replicate at the pace you want with whatever array size, and display the information as it's received or after it completes.


-Zombie
User avatar
Cheese
OldUnreal Member
Posts: 24
Joined: Tue May 22, 2007 11:38 pm

Re: Internet + Mod = Strange problem. Help please?

Post by Cheese »

I've split the struct into:

Code: Select all

var() config string Item[32];
var() config string Cost[32];
The crash still happened.


I messed around a bit and have managed to get the crash to stop, by:

Code: Select all

Replication
{ Reliable if (role == role_authority && bnetowner) Item; }
or:

Code: Select all

Replication
{ Reliable if (role == role_authority && bnetowner) Cost; }
Unreal only wants to replicate one of the values at once.. Either Cost or Item can be replicated.
I tried replicating both but reducing the memory usage:

Code: Select all

var() config string Item[16];
var() config string Cost[16];

Replication
{ Reliable if (role == role_authority && bnetowner) Item, Cost; }
But this still crashed the server (though it shouldn't :o ).


After about 2 hours of trying to find the problem and testing around...

I found a simple yet extremely f$#*ing stupid conclusion.

The game is having some trouble replicating more than one config variable at the same time.


I'm seriously confused and pissed off at the unreal engine at the moment. :o :o :o :o :o
Last edited by Cheese on Tue Jan 08, 2008 1:18 am, edited 1 time in total.
Currently lurking...
fxsr789

Re: Internet + Mod = Strange problem. Help please?

Post by fxsr789 »

Have you tried this?

Code: Select all

Replication
{ 
Reliable if (role == role_authority && bnetowner) 
Item;
Reliable if (role == role_authority && bnetowner) 
Cost;  
}
- Fenix
Pcube

Re: Internet + Mod = Strange problem. Help please?

Post by Pcube »

I would make a struct.

Code: Select all

Struct Whatever
{
   var config string item;
   var config int cost;
}

var config whatever ItemSlot[32];

Replication
{
Reliable if ( Role == Role_Authority )
   ItemSlot;
}

Here's what I did in ZeldaGame's ShopMutator addon.

Code: Select all

Var(MutatorPlus) config Struct S
{
      var() class BuyClass;
      var() int Stock;
      var() int Cost;
}SItem[50];

replication
{
      Reliable if ( Role==Role_Authority )
            SItem;
}
This replicated without fail. I'd type more but I'm feeling a bit under the weather, and it's not raining.
User avatar
Cheese
OldUnreal Member
Posts: 24
Joined: Tue May 22, 2007 11:38 pm

Re: Internet + Mod = Strange problem. Help please?

Post by Cheese »


ave you tried this?

Code:

Replication
{
Reliable if (role == role_authority && bnetowner)
Item;
Reliable if (role == role_authority && bnetowner)
Cost;
}

Yes, it had the same results. (crashed).
I would make a struct.
Code:

Struct Whatever
{
var config string item;
var config int cost;
}

var config whatever ItemSlot[32];

Replication
{
Reliable if ( Role == Role_Authority )
ItemSlot;
}
That's what I did in the first place. Same result as well (crashed; more than 1 variable).

Here's what I did in ZeldaGame's ShopMutator addon.
Code:

Var(MutatorPlus) config Struct S
{
var() class BuyClass;
var() int Stock;
var() int Cost;
}SItem[50];
I'll have to try that. I haven't actually tried the syntax "var config struct", It might work, it might not.
Who knows, my Unreal is being stupid.


Currently lurking...
Pcube

Re: Internet + Mod = Strange problem. Help please?

Post by Pcube »

Try making the class name not a string, but an actual Class (or whatever limiter). I think Zombie mentioned something about a limiter. Anyways, that's what I did in my ZeldaGame mod. As I think everyone knows, strings are the largest variables to replicate. It's much easier to replicate 3 than to replicate "3", which is why it would be more efficient to use class or something.
User avatar
Zombie
Administrator
Posts: 322
Joined: Thu May 09, 2002 11:44 pm

Re: Internet + Mod = Strange problem. Help please?

Post by Zombie »

I mentioned using delimiters for a single replicated string array. For instance, to store the item and its cost to one element.

RepList = TheItem$":"$string(TheCost); // Colon

When the client receives it would then have to parse for the units of data using string functions.


-Zombie
Pcube

Re: Internet + Mod = Strange problem. Help please?

Post by Pcube »

Oh.. my mistake. >:(
User avatar
.:..:
OldUnreal Member
Posts: 1637
Joined: Tue Aug 16, 2005 4:35 am

Re: Internet + Mod = Strange problem. Help please?

Post by .:..: »

For best result: I'd use function.
Something like:

Code: Select all

Replication
{ 
  Reliable if( role == role_authority ) 
    ClientReceiveItem;  
} 

simulated function ClientReceiveItem( int Index, int Cost, string Item )
{
   List[Index].Cost = Cost;
   List[Index].Item = Item;
}
function SendItToClient()
{
   local int i;

   For( i=0; i
1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD :P
(ಠ_ಠ)

Return to “UScript Board”