[SOLVED] SUPPORTED SFS VARIABLE TYPES

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

User avatar
TryMyGames
Posts: 59
Joined: 19 Dec 2016, 22:20
Location: Moldova, Chisinau
Contact:

[SOLVED] SUPPORTED SFS VARIABLE TYPES

Postby TryMyGames » 01 Jun 2017, 10:38

SFSError: Unsupport SFS Variable type: Byte

Really????
Why can't I optimize the network traffic by using smaller data types??? It is very frustrating because custom extension requests supports byte and short types :(

For example I want to add a user variable that can be an int value between 0-3, should I use int or a SFSObject with a byte variable in it?? Which one take more traffic?
Last edited by TryMyGames on 01 Jun 2017, 15:28, edited 1 time in total.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SUPPORTED SFS VARIABLE TYPES

Postby Lapo » 01 Jun 2017, 13:16

You can use an SFSObject with whatever values/types you need.
Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
TryMyGames
Posts: 59
Joined: 19 Dec 2016, 22:20
Location: Moldova, Chisinau
Contact:

Re: SUPPORTED SFS VARIABLE TYPES

Postby TryMyGames » 01 Jun 2017, 13:25

TryMyGames wrote:For example I want to add a user variable that can be an int value between 0-3, should I use int or a SFSObject with a byte variable in it?? Which one take more traffic?


If int takes 4 bytes, then how much will take a SFSObject with a byte int it?
User avatar
TryMyGames
Posts: 59
Joined: 19 Dec 2016, 22:20
Location: Moldova, Chisinau
Contact:

Re: SUPPORTED SFS VARIABLE TYPES

Postby TryMyGames » 01 Jun 2017, 14:12

Lapo wrote:You can use an SFSObject with whatever values/types you need.
Cheers


I asked another question ;) Thanks.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SUPPORTED SFS VARIABLE TYPES

Postby Lapo » 01 Jun 2017, 14:47

You can dump the SFSObject via getDump() and getHexDump() and count the bytes.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 19 guests