Re: [問題] semote

看板mud (網路地下城/文字遊戲)作者 (2008 Fighter!)時間17年前 (2008/10/13 10:54), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串3/4 (看更多)
應該是/data/emoted.o有被動到吧 如果要預防萬一的話 string *query_all_emote() { if (!mapp(emote) return 0; else return keys(emote); } 加一個判定 如果emoted.o這個檔有問題的話 也不會跑出錯誤訊息 不過這是比較消極的做法啦XD ※ 引述《howar31 (影紫‧歐人)》之銘言: : → skwen:去adm/daemons/emoted.c的178行 看有沒有操作mapping結構的 10/13 00:37 : → skwen:程式碼吧,因為mapping為空,不能操作,所以要加一些判斷式. 10/13 00:37 : 感謝樓上這位大大@@ : == : 170~179行內容是這樣: : 170 mapping query_emote(string pattern) : 171 { : 172 if( !undefinedp(emote[pattern]) ) return emote[pattern]; : 173 else return ([]); : 174 } : 175 : 176 string *query_all_emote() : 177 { : 178 return keys(emote); : 179 } : == : S大所說的Mapping是指170行這個嗎? : Edo...不是很瞭解...Orz -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.44.14.20

10/13 22:05, , 1F
這種作法如果 return 0 就會是空的列表囉?@@
10/13 22:05, 1F

10/13 22:05, , 2F
這樣用edemote就會覆蓋掉原來的emoted.o=_____=
10/13 22:05, 2F
文章代碼(AID): #18yhY2tA (mud)
討論串 (同標題文章)
本文引述了以下文章的的內容:
0
7
以下文章回應了本文
1
1
完整討論串 (本文為第 3 之 4 篇):
1
1
1
2
0
7
0
2
17年前, 10/12
文章代碼(AID): #18yhY2tA (mud)