Register | Login
Forum Index > Source Help > better way of making a string with vars in it?
Author Message
Pages: 1
Molotov
Member
(send private message)

Posts: 49
Topics: 21

Location:
Behind Keyboard
[832] better way of making a string with vars in it? - posted: 2011-11-25 14:59:15
Is there a better/faster/easier way of doing this?

Code:
  strlcpy(settings,'Language=',9);
  strAppend(settings,@zAppLanguage,512);
  strAppend(settings,'\r\nConfirmExit=',512);
  strAppend(settings,@zAppConfirmExit,512);
  strAppend(settings,'\r\nLogActions=', 512);
  strAppend(settings,@zAppLogActions,512);


cheers

"Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[833] - posted: 2011-11-25 15:11:19
there is a macro in strings.zir to make it easier

Code:
  settings = 0; //make sure var starts with null char.

  strJoin(settings, 'Language=', @zAppLanguage, '\r\nConfirmExit=', @zAppConfirmExit, '\r\nnLogActions=', @zAppLogActions, 512);


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Molotov
Member
(send private message)

Posts: 49
Topics: 21

Location:
Behind Keyboard
[834] - posted: 2011-11-25 15:14:08
Ah must have missed that one..

thanks. smile

"Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 15 user(s) online. 0 member(s) and 15 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd