Comments inside strings
#11

Pawn supports static string concatenation, so you can do it like this:

pawn Код:
//note:
"string1""string2" == "string1string2"

new gVehModel_Motorbike[] = "\
462, "
/* Faggio*/"\
581, "
/* BF-400*/"\
461, "
/* PCJ-600*/"\
521, "
/* FCR-900*/"\
463, "
/* Freeway*/"\
586 "
/* Wayfarer*/"\
"
;
Though I really dont see why you should do that. Saving ids as strings takes more ram, and parsing them back to integers to use them takes more cpu.
Reply


Messages In This Thread
Comments inside strings - by MP2 - 27.06.2012, 16:23
Re: Comments inside strings - by Vince - 27.06.2012, 16:27
Re: Comments inside strings - by Gh05t_ - 27.06.2012, 16:28
Re: Comments inside strings - by MP2 - 27.06.2012, 16:32
Re: Comments inside strings - by Britas - 27.06.2012, 16:36
Re: Comments inside strings - by MP2 - 27.06.2012, 16:43
Re: Comments inside strings - by Gh05t_ - 27.06.2012, 16:48
Re: Comments inside strings - by Roko_foko - 27.06.2012, 16:52
Re: Comments inside strings - by MP2 - 27.06.2012, 17:13
Re: Comments inside strings - by Gh05t_ - 27.06.2012, 17:35
Re: Comments inside strings - by Mauzen - 27.06.2012, 18:47
Re: Comments inside strings - by MP2 - 28.06.2012, 02:35

Forum Jump:


Users browsing this thread: 1 Guest(s)