attaching multiple constants to 1 string

This issue has pissed me off for many years now. I have a line of code that I don't want very long. To shorten it, I want to be able to write the string, then the starting and ending number. For example, house 1 through 5. Instead of writing if(currentloc=="house1" or currentloc=="house2" or currentloc=="house3", ect, I want to be able to write if (currentloc=="house"1,5 to shorten it. I've already figured out making a string variable and adding it to the end, if (currentloc=="house"+string, helps, but what do I write in that string variable to make it recognize numbers 1 through 5? Thanks

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ivan_soto via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector

Reply via email to