Rare Spawn
Well-known member
- Joined
- Oct 10, 2022
- RedCents
- 3,282¢
I need a hint as to why this doesnt work like I think it should. The error I get is about about concatenating the string and the integer value of ID.
I read that Lua .. is suppose to convert to strings automatically. I attempted to use tostring() with no luck.
This throws a Lua error:
[CODE lang="Lua" title="Error"]mq.cmd("/mqtarget id "..mq.TLO.SpawnSort(1,asc,PctHPs,"xtarhater radius 90").ID())[/CODE]
And this is a workaround:
[CODE lang="Lua" title="Non Lua workaround"]mq.cmd("/mqtarget id ${SpawnSort[1,asc,PctHPs,xtarhater radius 90].ID}")[/CODE]
What is the correct way to do this is Lua?
Thanks.
I read that Lua .. is suppose to convert to strings automatically. I attempted to use tostring() with no luck.
This throws a Lua error:
[CODE lang="Lua" title="Error"]mq.cmd("/mqtarget id "..mq.TLO.SpawnSort(1,asc,PctHPs,"xtarhater radius 90").ID())[/CODE]
And this is a workaround:
[CODE lang="Lua" title="Non Lua workaround"]mq.cmd("/mqtarget id ${SpawnSort[1,asc,PctHPs,xtarhater radius 90].ID}")[/CODE]
What is the correct way to do this is Lua?
Thanks.

