2011-11-10 43 views
0

我需要在東京暴君服務器中使用lua擴展。我已經嘗試所有從源代碼建立盧阿版本,每次llua被發現和llua5.1不,ldd ttserver說,任何lua庫沒有與這個二進制鏈接,所以我從盧阿網站下載二進制包,並且ldd給出正確的輸出,但腳本仍然無法正常工作,在日誌中我只能找到: 錯誤scrextnew失敗。一切不會正常工作,只有LUA擴展:(適合東京暴君的lua版本

+0

問題可能不在於您使用的Lua版本,而是您使用它的方式。請解釋你是如何準確地(命令,相關配置行,操作系統等)連接兩者。 – kikito

回答

0

在代碼中有產生你看到錯誤消息,並且都是作爲一個失敗的這一號召

/* Initialize the global scripting language extension. */ 
void *scrextnew(void **screxts, int thnum, int thid, const char *path, 
       TCADB *adb, TCULOG *ulog, uint32_t sid, TCMDB *stash, TCMDB *lock, 
       void (*logger)(int, const char *, void *), void *logopq){ 

這似乎結果兩個點成爲腳本語言的加載器,並且有一個路徑作爲第四個參數 - 所以我會看看一些配置,看看你是否需要把dll /放在某處,或者它看着錯誤的地方?我從來沒有用過它(但現在好奇它:-)),所以只是猜測。

[更新]

曾在頭一看 - scrext.h並有一些參數說明 - 還有一些需要配置參數 - 路徑和SID脫穎而出

/* Initialize the scripting language extension. 
    `screxts' specifies an array of the scripting language extension objects. 
    `thnum' specifies the number of the native threads. 
    `thid' specifies the thread ID number. 
    `path' specifies the path of the initilizing script. 
    `adb' specifies the abstract database object. 
    `ulog' specifies the update log object. 
    `sid' specifies the server ID. 
    `stash' specifies the global stash object. 
    `lock' specifies the global lock object. 
    `logger' specifies the pointer to a function to do with a log message. 
    `logopq' specifies the opaque pointer for the logging function. 
    The return value is the scripting object or `NULL' on failure. */ 
void *scrextnew(void **screxts, int thnum, int thid, const char *path, 
       TCADB *adb, TCULOG *ulog, uint32_t sid, TCMDB *stash, TCMDB *lock, 
       void (*logger)(int, const char *, void *), void *logopq); 

心連心