作者happyhero (2008 Fighter!)
看板mud
標題Re: [問題] semote
時間Mon Oct 13 10:54:56 2008
應該是/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
推 howar31:這種作法如果 return 0 就會是空的列表囉?@@ 10/13 22:05
→ howar31:這樣用edemote就會覆蓋掉原來的emoted.o=_____= 10/13 22:05