# How do I fix this Roll20 macro for starting gold after first level?

Can anyone help with this macro? I am trying to generate random starting gold per PC levels, but it only allows me to do it if I put a character’s name. For example:

[[@{Javi "Bones" Rorrey|base_level} *100 +1d10 *25]]

• Do you mean that you want it to do it for all your players? Kinda like a for every player do? – Chepelink Oct 15 '19 at 5:17
• Welcome to RPG.SE! Take the tour if you haven't already, and check out the help center for more guidance. Can you clarify what it is you're trying to do? How do you expect it to calculate the result without specifying a character to use the level of? (Also, note that base_level will calculate based on only their starting class, which is different from character level if the character is multiclassed.) – V2Blast Oct 15 '19 at 5:42
• @Chepelink Yes I do, or mostly so when they generate a PC, they can generate it themselves. – Francisco De La Paz Oct 15 '19 at 5:50
• @FranciscoDeLaPaz - Might need the API? Doesn't look like looping is really native to the macro language - app.roll20.net/forum/post/653944/slug%7D – JohnP Oct 15 '19 at 13:58
• @JohnP Thank you for the link. The answer was just to make a query for input. You get [[100 *?{level} +1d10 *25]] starting gold – Francisco De La Paz Oct 15 '19 at 14:14

The answer was just to make a query for input. You get [[100 *?{level} +1d10 *25]] starting gold. Thank you @JohnP for pointing me in right direction.
Another way for the players to do this is to use [[@{selected|base_level} *100 +1d10 *25]]