Variable sync problems

Report any bugs here or ask questions here.

Variable sync problems

Postby storm8472 » 6 November 2019, 04:03

When using the variable sync triggers (specifically the one that overrides the value across all players), I noticed a problem with the type of value synced. When a number value like 100 is synced then executing any triggers such as adding to it result in it adding to the end (eg. 100 + 6 = 1006). I think the variable sync triggers are syncing everything as a string value.

storm8472
Recruit
 
Posts: 11
Joined: 27 June 2016, 02:57

Re: Variable sync problems

Postby Eric Gurt » 6 November 2019, 13:26

True, solution will be to multiply value by 1. There is less data to send if value type is not specified, so it works like this.
Work it harder
Make it better
Do it faster
Makes us stronger
More than ever hour
After our work is never over.
User avatar
Eric Gurt
PB2 Developer
 
Posts: 400
Joined: 14 July 2013, 16:46
Location: dn.ua

Re: Variable sync problems

Postby storm8472 » 7 November 2019, 02:07

But shouldn't the game just be able to assume it like it does when you set a variable with a number value?

storm8472
Recruit
 
Posts: 11
Joined: 27 June 2016, 02:57

Re: Variable sync problems

Postby Max teabag » 7 November 2019, 09:52

Maybe the client upon recieving a synced variable should try to parse it incase the string is a number?
+1 good tip to multiply the value.
Max Teabag
User avatar
Max teabag
Usurpation Soldier [50]
 
Posts: 98
Joined: 15 July 2013, 13:41

Re: Variable sync problems

Postby storm8472 » 8 November 2019, 01:08

When a variable changes the client already tries to parse it, so I'm wondering why variable syncing doesn't do that (also, the variable syncing triggers misspell "synchronized" as "syncronized", and didn't max quit?)

storm8472
Recruit
 
Posts: 11
Joined: 27 June 2016, 02:57


Return to Bug Reporting, Help & Support

Who is online

Users browsing this forum: No registered users



cron