mIRC Home    About    Download    Register    News    Help

Print Thread
problem with = in ini file #166142 07/12/06 02:07 AM
Joined: Sep 2006
Posts: 35
C
chump Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2006
Posts: 35
hi i wrote a little script that catches from ontexts and saves to ini..the problenm i have is when it saves to ini it returns the text like this

VA-Schmedding_800-(TRAUM079)-WEB-2006-d=1 SCENE.NUKE.not.working

with a = which i am trying to get rid of so the ini will read as follows

VA-Schmedding_800-(TRAUM079)-WEB-2006-d 1 SCENE.NUKE.not.working

any ideas thx peeps

Re: problem with = in ini file [Re: chump] #166143 07/12/06 02:13 AM
Joined: Sep 2006
Posts: 35
C
chump Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2006
Posts: 35
sorry forgot to paste the part i am having probs with ...here it is

var %rel1 = $strip($remove($2,[,])))
var %nuke = $strip($remove($3,[,])))
var %complete2 = %rel1 1 SCENE.NUKE. $+ %nuke
/writeini -n predb.ini nuked %complete2

Re: problem with = in ini file [Re: chump] #166147 07/12/06 02:50 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
try using $replace
You also have too many parantheses in your code.
Here's a re-write with all of the changes, and making it one line. If you need the variables for use elsewhere in the script, then use the second code.
Code:
.writeini -n predb.ini nuked $strip($replace($remove($2,[,]),=,$chr(32))) 1 SENCE.NUKE. $+ $strip($remove($3,[,]))

Code:
var %rel1 = $strip($remove($replace($2,=,$chr(32)),[,]))
var %nuke = $strip($remove($3,[,]))
var %complete2 = %rel1 1 SCENE.NUKE. $+ %nuke
/writeini -n predb.ini nuked %complete2

Re: problem with = in ini file [Re: RusselB] #166179 07/12/06 12:55 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That won't help. The issue is that INI files *need* to have = signs after the item name and that is what the OP doesn't want. Instead, it would be easier to use a text file instead of an ini file. You can still create categories in it if you want to, but it won't require the = signs. Or, you can include item names when using writeini. You can use $ini to get the number of items in the group and then make the item name 1 greater, so that each item name is a number. Just a thought.


Invision Support
#Invision on irc.irchighway.net
Re: problem with = in ini file [Re: Riamus2] #166228 08/12/06 01:27 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Oh...I thought the requester wanted to get rid of the = sign that was in the data being stored.

Re: problem with = in ini file [Re: RusselB] #166231 08/12/06 01:41 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, that's how it looks, but looking at the %complete2 variable, you can see that 1 is not part of the name.


Invision Support
#Invision on irc.irchighway.net