mIRC Home    About    Download    Register    News    Help

Print Thread
#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

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

Joined: Aug 2004
Posts: 7,252
R
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

Joined: Oct 2004
Posts: 8,330
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
Joined: Aug 2004
Posts: 7,252
R
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.

Joined: Oct 2004
Posts: 8,330
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

Link Copied to Clipboard