Ah I see City.getRank() returns 2 values (https://doc.theotown.com/modules/City.html#getRank)rjroldan1 wrote: 21 Jun 2020, 10:05Ølsken wrote: 21 Jun 2020, 10:02Is the flag an animation or static?
If static you forgotgetFrame([number]).
SoCode: Select all
flag1 = Draft.getDraft("Aosflag4"):getFrame(1) -- or Drawing.drawImage(flag1:getFrame(1), x, y)
An animation it works well if i exclude the rank condition but i dont want it to be like that
This is why it doesn't work rank is a draft
Code: Select all
rank = City.getRank() -- returns first value
--> rank: draft = [draft]Code: Select all
_, rank = City.getRank() -- returns draft for "_" and number for "rank"
--> _: draft = [draft]
--> rank: number = [number]Code: Select all
rank = select(2, City.getRank()) -- returns second value
--> rank: number = [number]