protoc-gen-lua icon indicating copy to clipboard operation
protoc-gen-lua copied to clipboard

int32 pasererror

Open zyq20130110 opened this issue 11 years ago • 3 comments

        local msg1= person_pb.Person() 
            msg1.personid = 100
            msg1.name = "zhag"
            msg1.email = "[email protected]"
            local pb_data = msg1:SerializeToString()  -- Parse Example 
            print(msg1.personid) 
            print(msg1.name) 
            print(msg1.email)

                           print result is 100  [email protected]

            local msg2 = person_pb.Person() 
            msg2:ParseFromString(pb_data) 
            print(msg2.personid)
            print(msg2.name)
            print(msg2.email)
                           print result is 0 [email protected]

why msg2.personid is 0 ??

zyq20130110 avatar Sep 22 '14 10:09 zyq20130110

@zyq20130110 i have test,i am all right. how about check photo file? the personid is right?

chiuan avatar Oct 20 '14 11:10 chiuan

i have same problem。。。do you fix it?

HelloAndGoodbye0 avatar Aug 01 '17 03:08 HelloAndGoodbye0

I use this as a client,and use nodejs as a sever。but i ParseFromString a int32 data is error

HelloAndGoodbye0 avatar Aug 01 '17 03:08 HelloAndGoodbye0