Re: [wizs] 問題[貳]
看板mud_sanc (Sanctuary - 聖殿)作者justinj (黑旋風)時間14年前 (2011/07/04 08:57)推噓0(0推 0噓 0→)留言0則, 0人參與討論串3/4 (看更多)
我只要目的不是想說 call....我換一個指令給你看
[我覺得應該是31的問題,因為cp到42沒事...sob]
某book在我身上
.
.
add_action("cmd_all","",1);
.
.
int cmd_all(string str)
{
.
.
file="/u/j/justinj/test/cmds/_"+verb;
if(!file_exists(file+".c")) return 0;
return call_other("/u/j/justinj/test/cmds/_"+verb,({"cmd_"+verb,str}));
}
現在測試songs這個指令
/u/j/justinj/test/cmds/_songs.c的內容
inherit DAEMON;
int states;
string ply="";
mixed file;
int cmd_songs(string str)
{
mixed dirs;
string strs,song;
object ppl=this_player();
write("states="+states+" ply="+ply+"\n");
if(!str||str=="") return notify_fail(@J
指令用法
songs list :歌單列表
songs [歌名] :播放歌曲
songs stop :停播放
songs edit [歌名] :
songs clean [歌名]:
J);
.
.
黃色那行是我來測試用的,以下測試結果
> songs
states=0 ply=
states=0 ply=
states=0 ply=
states=0 ply=
states=0 ply=
指令用法
songs list :歌單列表
songs [歌名] :播放歌曲
songs stop :停播放
songs edit [歌名] :
songs clean [歌名]:
> songs stop [沒播歌時return notify_fail...]
states=0 ply=
states=0 ply=
states=0 ply=
states=0 ply=
states=0 ply=
現在沒在播放歌曲呀!!
> songs stop [有播歌時write+return 1;]
states=14 ply=justinj
你停止播放歌曲!!
我主要問題不在於call....[再一次說一下cp到42沒問題,在31的問題...]
--
║☆█ █☆║
║☆█ 克 迷 倫 鎮 █☆║
║☆█ (Kemilen Town0m) █☆║
║☆█▃▃▃▃▃▃▃▃▃▃█☆║
║☆█◤ ◥█☆║
║☆◤ ◥☆║
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.129.142.135
※ 編輯: justinj 來自: 220.129.142.135 (07/04 08:59)
討論串 (同標題文章)
完整討論串 (本文為第 3 之 4 篇):
0
1
mud_sanc 近期熱門文章
PTT遊戲區 即時熱門文章
21
49