variables between two other strings?
#1

Well this question might sound stupid, but i just really need it now: in PHP you can set up a string like this $string = "hello".$name."<br />"; and in C++ you JavaScript you can do it too like this: string = "hello "+name+"<br />"; and in C++ you can put a variable into a string like this: "hello "<<name<<"<br />";. is this possible in PAWN?

or shall it be like this format(..., sizeof(...), "Hello %s <br />", name);

i was just wondering if it was possibe because i need something like that right now
Reply
#2

No, you should use format. However, it works with literal strings. For example:
pawn Код:
#define COL_GREEN "{00FF00}"
"some text and some " #COL_GREEN "green text"
Reply
#3

hmmm... sad... i really needed it like that :/. However, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)