This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| prpl:getshipfromslot [2017/03/30 06:21] – specified the error return values kajacx | prpl:getshipfromslot [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| === Description === | === Description === | ||
| - | int ARG1: Slot ID. Valid slot IDs are 0 to 23 inclusive. | + | Returns the Ship ID for any built ship associated with a given build slot. Valid slot IDs are 0 to 23 inclusive. (Note: -1 may be the HQ slot.) |
| - | + | ||
| - | Returns the Ship UID for any built ship associated with a given build slot. -1 is returned if the ship is not build (just having the CM placed | + | |
| === Examples === | === Examples === | ||
| - | < | + | < |
| - | </code> | + | CreateList ->PlayerFleet |
| + | 24 -1 do | ||
| + | I GetShipFromSlot ->Ship | ||
| + | <-Ship 0 gte if | ||
| + | < | ||
| + | endif | ||
| + | loop | ||
| + | # | ||
| + | </ | ||