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