I just wanted to know which code would be more efficient for my online engine (Both Work Fine I've Tested Them)
The first one sends the variables Str and Def to the server by packing them both into a string and sending that
The server then deciphers the string to get the original variables back
The second one sends Str and Def as separate numbers
The server reads them the same way
clearbuffer() writebyte(SEND_STAT) writeshort(playerid) total = (string(Str)+"|"+string(Def)) writestring(total) send_client(1)Then to read it on the server
total = readstring()
cnt = string_pos('|',total)
Str = real(string_copy(total,0,cnt-1))
Def = real(string_copy(total,cnt+1,cnt+4))Or would this method be betterclearbuffer() writebyte(SEND_STAT) writeshort(playerid) writeshort(Str) writeshort(Def) send_client(1)Then to read on the server
Str = readshort() Def = readshort()
I hope someone can clear this up for me THX



Find content
Male
