|
|
riffplayer |
|
|
Posts: 263
Gender:  Male
Posts Per Day: 0.15
Reputation: 100.00%
Time Online: 2 days 3 hours 50 minutes
Location: Indiana
Age: 33
|
When I am editing a mod and I am looking at a particular action that I want to delete, if I click the DELETE button, it doesn't delete that action, it actually deletes ANOTHER one that I have already coded.
I'm using P9.5.
This is very frustrating because now I have to go back and recreate things that took a lot of time to do. What the heck is going on???
It appears to always delete the last action in the list, no matter which action you are looking at. |
|
| Revision History (1 edits) |
| riffplayer - December 6, 2005, 3:06pm | | |
|
|
|
|
|
riffplayer |
|
|
Posts: 263
Gender:  Male
Posts Per Day: 0.15
Reputation: 100.00%
Time Online: 2 days 3 hours 50 minutes
Location: Indiana
Age: 33
|
Ok, I think I MIGHT have found the problem, but I would like one of the admins here to check this: It appears that the following lines in SourceCodeMod
|
Code
if($URL{'delete'}) { next; } ++$numbers; |
|
Should actually be
|
Code
if($URL{'delete'}) { ++$numbers; next; }
|
|
Am I right on this? I tried it and it SEEMS to be working now, but I'm not sure what other consequences this might have. EDIT: There's a problem with this fix and adding other actions. It saves the new action, but it gives it the same number as the last action so it will show that it has 4 steps, but when you view the v2m file you will see that the last two actions have the same number. This means it won't work and you can't edit those two actions. Any ideas? |
|
| Revision History (1 edits) |
| riffplayer - December 6, 2005, 4:30pm | | |
|
|
|
|
|
Justin |
|
|
Posts: 15,075
Gender:  Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
riffplayer |
|
|
Posts: 263
Gender:  Male
Posts Per Day: 0.15
Reputation: 100.00%
Time Online: 2 days 3 hours 50 minutes
Location: Indiana
Age: 33
|
Justin, I tried what you suggested, but it didn't seem to work. It appears that the delete function is only messing with the number of mod writes and not really deleting the write itself. So if you have 4 writes and you delete one, it just changes the "<openfile="****" writes="4"> line to "<openfile="****" writes="3">" but 4 are actually in the file - that's why the last one seemed to be deleted - it just wasn't shown any more. Ok, I think I've figured it out, but I'd really like someone to take a look at this and see if I'm right. The original code has this:
|
Code
if($URL{'delete'}) { next; } ++$numbers; } else { $search{$files,$count} =~ s/\r\Z//gsi; $write{$files,$count} =~ s/\r\Z//gsi; ++$numbers; }
$search{$files,$count} =~ s/\r/\n/gsi; $write{$files,$count} =~ s/\r/\n/gsi; $writetofile .= qq~<mod search="$numbers">\n$search{$files,$count}\n</mod end>\n~; $writetofile .= qq~<mod write="$numbers" action="$type{$files,$count}">\n$write{$files,$count}\n</mod end>\n~; } |
|
I think it should be this:
|
Code
if($URL{'delete'}) { next; } } else { $search{$files,$count} =~ s/\r\Z//gsi; $write{$files,$count} =~ s/\r\Z//gsi; ++$numbers;
$search{$files,$count} =~ s/\r/\n/gsi; $write{$files,$count} =~ s/\r/\n/gsi; $writetofile .= qq~<mod
search="$numbers">\n$search{$files,$count}\n</mod end>\n~; $writetofile .= qq~<mod write="$numbers"
action="$type{$files,$count}">\n$write{$files,$count}\n</mod end>\n~; } }
|
|
The "++$numbers" line after the "if($URL{'delete'}) { next; }" line doesn't seem to belong. Then, the ending "}" in the else statement seems like it should go AFTER the writetofile statements. Am I right on this? I've tested it and it seems to work now. |
|
|
|
|
|
Justin |
|
|
Posts: 15,075
Gender:  Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
riffplayer |
|
|
Posts: 263
Gender:  Male
Posts Per Day: 0.15
Reputation: 100.00%
Time Online: 2 days 3 hours 50 minutes
Location: Indiana
Age: 33
|
You're right, that worked. Thanks! I should have noticed that before. |
|
|
|
|
|
|