Re: [wizs]問題請教(十四)
看板mud_sanc (Sanctuary - 聖殿)作者amosdeus (幽素)時間18年前 (2007/07/18 22:06)推噓2(2推 0噓 0→)留言2則, 1人參與討論串3/6 (看更多)
#include "../virtue.h"
inherit ROOM;
void create()
{
::create();
seteuid(getuid(this_object()));
set("light",1);
set("short","test");
set("long",@PLAIN
test
PLAIN
);
}
int room_check_poison(); // 事先宣告
void init()
{
object ppl;
if(!userp(ppl)) return ;
if(query("callouting")) return ;
set("callouting",1);
check_poison();
return ;
}
void room_check_poison()
{
object env,ob=this_object();
mixed usr=all_inventory(env);
int i;
foreach(ob in usr)
{
if(userp(ob))
{
// 看要讓玩家怎麼中毒, 寫在這裡
}
else
i++;
}
if(i==sizeof(usr))
{
delete("callouting");
remove_call_out("room_check_poison");
return ;
}
call_out("room_check_poison",看要設幾秒寫在這裡);
return ;
}
> /u/p/plain/wide/virtue/room2/nt01: 編譯時段錯誤:
/u/p/plain/wide/virtue/room2/nt01.c line 24: Undefined function check_poison before ;
編譯時段錯誤:
/u/p/plain/wide/virtue/room2/nt01.c line 52: Warning: Return type doesn't match prototype ( void vs int ) before the end of line
載入物件錯誤.
Error: *Error in loading object '/u/p/plain/wide/virtue/room2/nt01'
Errors written to /u/p/plain/log:
/u/p/plain/wide/virtue/room2/nt01.c line 24: Undefined function check_poison before ;
/u/p/plain/wide/virtue/room2/nt01.c line 52: Warning: Return type doesn't match prototype ( void vs int ) before the end of line
稍微有問題 我測試不出來24要修改哪裡?
以上
謝謝
Plain@Sanc
--
咽咽學楚吟 病骨傷幽素 秋姿白髮生 木葉啼風雨
燈青蘭膏歇 落照飛蛾舞 古壁生凝塵 羇魂夢中語
【 傷心行 李賀 】
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.127.97.83
推
07/18 22:16, , 1F
07/18 22:16, 1F
推
07/18 22:20, , 2F
07/18 22:20, 2F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 3 之 6 篇):
mud_sanc 近期熱門文章
PTT遊戲區 即時熱門文章