Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display text & a variable in error message?
#1
Hi,

I'm wanting to display both set text and a variable in an error messgae, however I can't seem to figure out how to do this, can anyone show me please?

I'm trying to display "Hello NAME", where NAME is a variable.

I tried using

mes ("Hello" s)

But it just gave an error, is there a way of doing this?

Thanks,

Paul.
#2
Like this?

Macro
Code:
Copy      Help
str name="Paul"
mes("Hello, %s" "ERROR" "x" name)

note: you can use Message box in QM toolbar.
#3
Cheers Lucas, that worked.

My only question is, what if I was to use multiple variables?
#4
Macro
Code:
Copy      Help
str name1("Paul") name2("Lucas")
mes("Hello, %s and %s" "ERROR" "x" name1 name2)

note: you can use Message box in QM toolbar.


Forum Jump:


Users browsing this thread: 1 Guest(s)