Now I don't have much time for find what equipment to wear for different situation.I want make a database to quickly find what I need.(Old information of EQs is post on BBS)
After serveral days scripting for catch information , I meet problem when adding data to SQLite DB...
The identify example is like below: (In Chinese Traditional, I translate and mark with different color in English at right)
The problem is物品名稱: 火靈之吻(kiss of salamander) Item: 火靈之吻(kiss of salamander)
物品狀態: 發光 .Flag: Glowing
裝備位置: 盾牌Wear: shield
影響 智力 2 點. Int 2
- Can I name Table with non-English but other language encoding in UTF-8?
I create a databasework and show correct in DB browser. But when I add data in Mudlet, I cannot did it.Code: Select all
db:create("eqbank", {shield = "名稱","狀態","智力"})
Mudlet says syntax error near symble = and give me a little ladybug XDCode: Select all
local mydb = db:get_database("eqbank") db:add(mydb.Shield, {名稱 = "火靈之吻" ,狀態 = "發光", 智力 = 2}) db:close(mydb)
I tried use [[名稱]] and "名稱" '名稱', all are wrong, but I change table name in English, It work!
I am not a English player, reading 90+ information in mother langue will be more happy.
- 2. How to script correctly and lightly when adding data to database?
I made a alias for testNothing add, Error report is :Code: Select all
pattern: ^dddd$ code: local mydb = db:get_database("eqbank") db:add(mydb.Shield,{Int=15})
LUA ERROR: when running script writedata (Alias86),
reason: ...ppData\Local\Mudlet\app-4.17.2\mudlet-lua\lua\DB.lua:780: attempt to index local 'conn'
(a nil value)
And put db:create in that will workmy database will be 10 sheets (hands/boots/etc..) , every sheet has 90 columnCode: Select all
pattern: ^dddd$ code: db:create("eqbank", {shield = "Name","Flag","Int"}) local mydb = db:get_database("eqbank") db:add(mydb.Shield,{Int=15})
If put every db:create code before I add data, script will be more complex.
How to resolve it??
- Question3 is : Can I add data in Mudlet table like Cmud?
I have a data in table:
i.e.In Cmud I can use (#new ItemData) to put every data into db (but Cmud is crash too often )Code: Select all
ItemData = {Name = "shield", Flag = "glow" , Int = 2}
In Mudlet, Is there simple script instead of put every key in table one by one?
P.S. My colum is same as variants i.e Name = ItemData .Name AC=ItemData .AC