An open save-archive handle: a stale one (closed, or from a previous run) is as much a script bug as an out-of-range index.
| 93 | // An open save-archive handle: a stale one (closed, or from a previous run) |
| 94 | // is as much a script bug as an out-of-range index. |
| 95 | int savArg(const ScriptArgs& args, int i) |
| 96 | { |
| 97 | const int handle = args.num(i); |
| 98 | if (!host().savValid(handle)) { |
| 99 | args.fail("argument %d is %d, not an open save handle", i + 1, handle); |
| 100 | } |
| 101 | return handle; |
| 102 | } |
| 103 | |
| 104 | std::string idToHex(uint64_t id) |
| 105 | { |
no test coverage detected