Unreal Replication Problems...

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Unreal Replication Problems...

Postby WCCC » Wed Mar 24, 10 12:14 am

I have serious problems with unreal replication, im trying to make a multiplayer ATM that stores money in a mutator, that can then be configured and saved via ini file... only problem is, i'm one of the world's biggest nubs with unreal replication, and after trying a dozen or so combinations... i'm up short on the variables, the functions are executing right, but the atm's being denied access to the variables, to be more specific.
below is all the code you should need to help me, provided your interested, of course.

for reference, a window is triggering a command in the atm, which is in turn triggering command in the mutator, which is then accessing its own variables, but simply because it's being accessed from an outside source, it's not working...

var config string AccountIPs[100];
var config int AccountBalances[100];

replication
{
reliable if (role == ROLE_Authority)
GetAccountNum, GetAccountBalance, MakeNewAccount, AddAccountBalance, SubAccountBalance;
reliable if (role < ROLE_Authority)
AccountIPs, AccountBalances;
}
F*cking college... you're not my best friend anymore.
User avatar
WCCC
Wannabe
 
Posts: 82
Joined: Sat Sep 19, 09 7:23 pm
Location: California

Postby ~[Px]DrugCraze~ » Tue Apr 06, 10 5:23 pm

Are you trying to make it like the DarkForce ATMS? or exactly like the singleplayer ATM screens?
~[Px]DrugCraze~
Newbie
 
Posts: 1
Joined: Tue Apr 06, 10 5:19 pm

Postby WCCC » Wed Apr 07, 10 6:05 pm

Dark Force ATMs were kinda buggy, and singleplayer doesn't have a withdraw button, and I don't want money to gain interest over time, I want the money to just be stored on the server in a .ini file, the atm screen is like single player but has an added withdraw button, and as listed above, the menu screen is having trouble getting access to the either the ATM or the Mutator, for some damn reason it can modify the account balance, but it can't get the amount in the balance, it just assumes 0 every time.
F*cking college... you're not my best friend anymore.
User avatar
WCCC
Wannabe
 
Posts: 82
Joined: Sat Sep 19, 09 7:23 pm
Location: California

Postby ~ô¿ô~Nobody~ » Fri May 07, 10 9:33 am

I know this topic is older but I have the duty to say that your replication rules are rubbish.
Even if that works, it wouldn't be very secure.

Code: Select all
reliable if (role < ROLE_Authority)
AccountIPs, AccountBalances;


First of all, you should not replicate those variables to the server.
By that, clients could modify the server values of all accounts easily.
Also, the server variables are not replicated to the client which means the client (window system) doesn't know about the current balance.

Code: Select all
reliable if (role == ROLE_Authority)
GetAccountNum, GetAccountBalance, MakeNewAccount, AddAccountBalance, SubAccountBalance;


Hmmm.. are you trying to get the account information from the client?
Basically, the client should know as few as possible.
Independently of that.. you can not call a replicated function and expect to get a proper return value.
As in (for instance).. sending getClientInfo to the client and expecting a return value from the client over the network.
This does not work.

Independently of all this.. calling remote function does NOT work, if a player is not the owner of the object you're calling the functions from...
Nobody is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby WCCC » Fri May 07, 10 11:55 pm

i did try the setowner stuff, and oops, see how little i know about replication? besides i dont know of any way to modify arrays past the first variable. anywho since this post was made a completely revamped the system so you can work the entire thing with your nano wallet, and the mod has since been merged with the wallets mod consequently. it all works when controlled via weapons, its just that trying to do anything with menus is a real bitch, i think ill just avoid them in the future.

and finally, thanks nobody, ill make sure to removed the replication for the variables if i haven't already. :D
F*cking college... you're not my best friend anymore.
User avatar
WCCC
Wannabe
 
Posts: 82
Joined: Sat Sep 19, 09 7:23 pm
Location: California


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 3 guests
cron