This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
4rpl:commands:setunitwantsern [2024/06/13 14:56] – [Workaround for SetUnitWantsErn(<-uid 0)] Kalli | 4rpl:commands:setunitwantsern [2024/06/13 18:32] (current) – [Workaround for SetUnitWantsErn(<-uid 0)] Kalli | ||
---|---|---|---|
Line 26: | Line 26: | ||
# and recreate it without the ERN. That's what this function is for. | # and recreate it without the ERN. That's what this function is for. | ||
- | <-uid GetUnitWantsErn not GetUnitErnState AND if | + | <-uid GetUnitWantsErn not < |
<-uid @freeErnFromUnit | <-uid @freeErnFromUnit | ||
endif | endif | ||
Line 32: | Line 32: | ||
: | : | ||
->UID | ->UID | ||
- | <-UID getunitconstructingdata ev2 dup -1 eq if pop 999 endif -> | + | <-UID getunitconstructingdata ev2 pop dup -1 eq if pop 999 endif -> |
<-UID getunittype <-UID getunitposition <-UID getunitsettings createunit dup ->newUID < | <-UID getunittype <-UID getunitposition <-UID getunitsettings createunit dup ->newUID < | ||
# Resources that are on the way to the old unit will be lost. | # Resources that are on the way to the old unit will be lost. |