A catalog index, the same index space as the Save list — a script gets one from titles_count()/title_find().
| 73 | // A catalog index, the same index space as the Save list — a script gets |
| 74 | // one from titles_count()/title_find(). |
| 75 | int titleIndexArg(const ScriptArgs& args, int i) |
| 76 | { |
| 77 | const int idx = args.num(i); |
| 78 | const int count = host().titleCount(); |
| 79 | if (idx < 0 || idx >= count) { |
| 80 | args.fail("argument %d is title index %d, out of range (%d titles)", i + 1, idx, count); |
| 81 | } |
| 82 | return idx; |
| 83 | } |
| 84 | |
| 85 | HostTitle titleArg(const ScriptArgs& args, int i) |
| 86 | { |
no test coverage detected