Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

嵌套多个proto的不能用 #4

Open
pcxin opened this issue Apr 15, 2014 · 6 comments
Open

嵌套多个proto的不能用 #4

pcxin opened this issue Apr 15, 2014 · 6 comments

Comments

@pcxin
Copy link

pcxin commented Apr 15, 2014

双嵌套的不能用呀

下面是报错信息 和 3个proto文件内容 求解决呀 ^~^

LUA ERROR: [string "protobuf.lua"]:288: attempt to index upvalue 'message_type' (a nil value)

文件p_result.proto:
import "p_user.proto";
import "p_major.proto";

message Result {
required int32 resultCode = 1;
optional string failCode = 2;
optional User user = 3;
optional Major major = 4;
}

文件p_user.proto:
message User{
optional string userId = 1;
required string username = 2;
optional string password = 3;
optional string channel = 4;
optional string regdate = 5;
optional string lastlogindate = 6;
optional string tokenId = 7;
optional bool isFast = 8;
optional bool isBinded = 9;
}

文件p_major.proto:
message Major{

optional string userId = 1;
optional string majorId = 2;
optional string majorCode = 3;

}

@zhmx
Copy link

zhmx commented May 25, 2014

请问这个问题解决了吗?我也遇到了 attempt to index upvalue 'message_type' 报空值

@pcxin
Copy link
Author

pcxin commented May 26, 2014

我换了好几个 都没弄通最后 用云风的pbc 可以了 还是把所有的 proto文件合并成一个使用的(项目使用的是pbc) 不知道protoc-gen-lua 合并成一个能用不 我测试过 protoc-gen-lua 和 Java后端进行通信 使用浮点数类型的不java后端解析不出来直接出异常 lua层正常解析

@AdamWu
Copy link

AdamWu commented Jun 13, 2014

遇到同样得到问题了,手动改下倒是可以,正在研究怎么自动导出

@zhmx
Copy link

zhmx commented Jun 13, 2014

用风云的pb就可以

@AdamWu
Copy link

AdamWu commented Jun 15, 2014

tks

2014-06-13 20:26 GMT+08:00 zhmx [email protected]:

用风云的pb就可以


Reply to this email directly or view it on GitHub
#4 (comment)
.

@seekagain
Copy link

#7 fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants