罪と罰++二律背反
罪罰改造板2/427
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
] [
リンク元
]
開始行:
*ユーザーデータのバグ [#e5a3a17d]
-ページ: [[罪罰改造板2]]
-投稿者: [[じょるじゅ]]
-優先順位: 緊急
-状態: 完了
-カテゴリー: エラーが出ます
-投稿日: 2006-10-30 (月) 00:05:13
-バージョン:
**内容 [#a104b737]
普通usrdataを開くと、一行目にキャラデータ、二行目に最終ロ...
それが何故か一度管理ページからキャラデータを編集すると、...
最近、迷宮で敵を倒した回数を追加しました。これを追加して...
日本語下手ですいません。
是非解決方法をお願いします。
----
-管理画面に何か追加する場合は必ず4箇所追加、1箇所変更しま...
# キャラデータ変更
# 書き換え画面
sub usr_regist{
〜〜〜〜〜〜〜〜〜〜〜〜
<td nowrap>
<select name="camp">
EOM
foreach(0 .. $#cmp){
print "<option value=$_";
print " selected" if($camp==$_);
print ">$_:$cmp[$_]\n";
}
print <<"EOM";
</select>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="2" cellpadding="2" align=...
<tr>
<th nowrap>HP</th>
<th nowrap>MP</th>
<th nowrap>UA</th>
<th nowrap>UD</th>
<th nowrap>LR</th>
<th nowrap>AG</th>
<th nowrap>GOLD</th>
<th nowrap>階級</th>
<th nowrap>称号</th>
<th nowrap>称号2</th>
<th nowrap>討伐回数</th>
<th nowrap>追加した回数名</th> #←ここを追加
</tr>
<tr>
</td>
<td nowrap><input type="text" name="max_hp" value="$max_...
<td nowrap><input type="text" name="max_mp" value="$max_...
<td nowrap><input type="text" name="ua" value="$ua" styl...
<td nowrap><input type="text" name="ud" value="$ud" styl...
<td nowrap><input type="text" name="lr" value="$lr" styl...
<td nowrap><input type="text" name="ag" value="$ag" styl...
<td nowrap><input type="text" name="gold" value="$gold" ...
<td nowrap>
<select name="rank">
EOM
foreach(0 .. $#cl){
print "<option value=$_";
print " selected" if($rank==$_);
print ">$_:$cl[$_]\n";
}
print <<"EOM";
</select>
</td>
<td nowrap>
<select name="sogo">
EOM
foreach(0 .. $#sogo_p){
print "<option value=$_";
print " selected" if($sogo==$_);
print ">$_:$sogo_p[$_]\n";
}
print <<"EOM";
</select>
</td>
<td nowrap>
<select name="sogo2">
EOM
foreach(0 .. $#sogo_p){
print "<option value=$_";
print " selected" if($sogo2==$_);
print ">$_:$sogo_p[$_]\n";
}
print <<"EOM";
</select>
</td>
<td nowrap><input type="text" name="we" value="$we" styl...
<td nowrap><input type="text" name="xxx" value="$xxx" st...
</tr>
</table>
〜〜〜〜〜〜〜〜〜〜〜〜〜
# 書き換え処理&結果
sub usr_regist2{
&admin_head;
# ファイルロック(rename式)
$lock = &lock if $lock_check;
# 参加者データ一括読み込み
open(IN,"$usrdata$in{'id_old'}\.cgi") || &error("Open Er...
@dat = <IN>;
close(IN);
%DAT = '';
my @prats = split(/,/,$dat[0]);
foreach (0 .. $#prats){
my ($key,$v) = split(/;/,$prats[$_]);
$DAT{$key} = $v;
}
# ハッシュ読み込み
&hash_data;
$dat[0] = "xxx;$in{'xxx'},fel_vit;$in{'fel_vit'},<中略>d...
open (OUT,">$usrdata$in{'id_old'}\.cgi") || &error("キャラテ...
print OUT @dat;
close(OUT) or die "Can't close : $!";
if($in{'id_old'} ne $in{'id'}){rename("$usrdata$in{'id_o...
# ファイルアンロック(rename式)
&unlock($lock) if $lock_check;
〜〜〜〜〜〜〜〜〜〜〜〜〜
<table border="0" cellspacing="2" cellpadding="2" align=...
<tr>
<th nowrap>HP</th>
<th nowrap>MP</th>
<th nowrap>UA</th>
<th nowrap>UD</th>
<th nowrap>LR</th>
<th nowrap>AG</th>
<th nowrap>GOLD</th>
<th nowrap>階級</th>
<th nowrap>称号</th>
<th nowrap>称号2</th>
<th nowrap>討伐回数</th>
<th nowrap>追加した回数名</th> #←ここを追加
</tr>
<tr>
<td nowrap>$in{'max_hp'}</td>
<td nowrap>$in{'max_mp'}</td>
<td nowrap>$in{'ua'}</td>
<td nowrap>$in{'ud'}</td>
<td nowrap>$in{'lr'}</td>
<td nowrap>$in{'ag'}</td>
<td nowrap>$in{'gold'}</td>
<td nowrap>$in{'rank'}</td>
<td nowrap>$in{'sogo'}</td>
<td nowrap>$in{'sogo2'}</td>
<td nowrap>$in{'we'}</td>
<td nowrap>$in{'xxx'}</td> #追加した変数を$xxxに...
</tr>
-こんな感じでどうでしょう?どこか間違っていたら言ってくだ...
-上のは自分の管理画面ですので、いくつか違う部分があると思...
-素早い対応ありがとう御座います。解決いたしました。が、$d...
-自分はずっと先頭に追加してきたのでその理由はわからないで...
-お返事ありがとう御座いました!!とりあえず直りましたし^...
#comment
終了行:
*ユーザーデータのバグ [#e5a3a17d]
-ページ: [[罪罰改造板2]]
-投稿者: [[じょるじゅ]]
-優先順位: 緊急
-状態: 完了
-カテゴリー: エラーが出ます
-投稿日: 2006-10-30 (月) 00:05:13
-バージョン:
**内容 [#a104b737]
普通usrdataを開くと、一行目にキャラデータ、二行目に最終ロ...
それが何故か一度管理ページからキャラデータを編集すると、...
最近、迷宮で敵を倒した回数を追加しました。これを追加して...
日本語下手ですいません。
是非解決方法をお願いします。
----
-管理画面に何か追加する場合は必ず4箇所追加、1箇所変更しま...
# キャラデータ変更
# 書き換え画面
sub usr_regist{
〜〜〜〜〜〜〜〜〜〜〜〜
<td nowrap>
<select name="camp">
EOM
foreach(0 .. $#cmp){
print "<option value=$_";
print " selected" if($camp==$_);
print ">$_:$cmp[$_]\n";
}
print <<"EOM";
</select>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="2" cellpadding="2" align=...
<tr>
<th nowrap>HP</th>
<th nowrap>MP</th>
<th nowrap>UA</th>
<th nowrap>UD</th>
<th nowrap>LR</th>
<th nowrap>AG</th>
<th nowrap>GOLD</th>
<th nowrap>階級</th>
<th nowrap>称号</th>
<th nowrap>称号2</th>
<th nowrap>討伐回数</th>
<th nowrap>追加した回数名</th> #←ここを追加
</tr>
<tr>
</td>
<td nowrap><input type="text" name="max_hp" value="$max_...
<td nowrap><input type="text" name="max_mp" value="$max_...
<td nowrap><input type="text" name="ua" value="$ua" styl...
<td nowrap><input type="text" name="ud" value="$ud" styl...
<td nowrap><input type="text" name="lr" value="$lr" styl...
<td nowrap><input type="text" name="ag" value="$ag" styl...
<td nowrap><input type="text" name="gold" value="$gold" ...
<td nowrap>
<select name="rank">
EOM
foreach(0 .. $#cl){
print "<option value=$_";
print " selected" if($rank==$_);
print ">$_:$cl[$_]\n";
}
print <<"EOM";
</select>
</td>
<td nowrap>
<select name="sogo">
EOM
foreach(0 .. $#sogo_p){
print "<option value=$_";
print " selected" if($sogo==$_);
print ">$_:$sogo_p[$_]\n";
}
print <<"EOM";
</select>
</td>
<td nowrap>
<select name="sogo2">
EOM
foreach(0 .. $#sogo_p){
print "<option value=$_";
print " selected" if($sogo2==$_);
print ">$_:$sogo_p[$_]\n";
}
print <<"EOM";
</select>
</td>
<td nowrap><input type="text" name="we" value="$we" styl...
<td nowrap><input type="text" name="xxx" value="$xxx" st...
</tr>
</table>
〜〜〜〜〜〜〜〜〜〜〜〜〜
# 書き換え処理&結果
sub usr_regist2{
&admin_head;
# ファイルロック(rename式)
$lock = &lock if $lock_check;
# 参加者データ一括読み込み
open(IN,"$usrdata$in{'id_old'}\.cgi") || &error("Open Er...
@dat = <IN>;
close(IN);
%DAT = '';
my @prats = split(/,/,$dat[0]);
foreach (0 .. $#prats){
my ($key,$v) = split(/;/,$prats[$_]);
$DAT{$key} = $v;
}
# ハッシュ読み込み
&hash_data;
$dat[0] = "xxx;$in{'xxx'},fel_vit;$in{'fel_vit'},<中略>d...
open (OUT,">$usrdata$in{'id_old'}\.cgi") || &error("キャラテ...
print OUT @dat;
close(OUT) or die "Can't close : $!";
if($in{'id_old'} ne $in{'id'}){rename("$usrdata$in{'id_o...
# ファイルアンロック(rename式)
&unlock($lock) if $lock_check;
〜〜〜〜〜〜〜〜〜〜〜〜〜
<table border="0" cellspacing="2" cellpadding="2" align=...
<tr>
<th nowrap>HP</th>
<th nowrap>MP</th>
<th nowrap>UA</th>
<th nowrap>UD</th>
<th nowrap>LR</th>
<th nowrap>AG</th>
<th nowrap>GOLD</th>
<th nowrap>階級</th>
<th nowrap>称号</th>
<th nowrap>称号2</th>
<th nowrap>討伐回数</th>
<th nowrap>追加した回数名</th> #←ここを追加
</tr>
<tr>
<td nowrap>$in{'max_hp'}</td>
<td nowrap>$in{'max_mp'}</td>
<td nowrap>$in{'ua'}</td>
<td nowrap>$in{'ud'}</td>
<td nowrap>$in{'lr'}</td>
<td nowrap>$in{'ag'}</td>
<td nowrap>$in{'gold'}</td>
<td nowrap>$in{'rank'}</td>
<td nowrap>$in{'sogo'}</td>
<td nowrap>$in{'sogo2'}</td>
<td nowrap>$in{'we'}</td>
<td nowrap>$in{'xxx'}</td> #追加した変数を$xxxに...
</tr>
-こんな感じでどうでしょう?どこか間違っていたら言ってくだ...
-上のは自分の管理画面ですので、いくつか違う部分があると思...
-素早い対応ありがとう御座います。解決いたしました。が、$d...
-自分はずっと先頭に追加してきたのでその理由はわからないで...
-お返事ありがとう御座いました!!とりあえず直りましたし^...
#comment
ページ名: