mIRC Homepage
Posted By: Kooky Scripting create an ini file? - 10/11/14 07:35 AM
So I have this script working to tell the person that the file has been made, but the file itself is not being created. Can anyone help? I want the file to be the $nick

Code:
on *:text:!Name*:#MyRoom: { 
  writeini -n $qt(F:\MyBot\Myfile) $nick $+ .ini $nick Name $2-
  writeini -n $qt(F:\MyBot\Myfile) $nick $+ .ini Register Name on
  notice $nick Your character name is registered. Step 2: $2- $+ , Get ready for more!
}
Posted By: Nillen Re: Scripting create an ini file? - 10/11/14 08:45 AM
You need to set $nick $+ .ini as part of the path. Your current path is F:\MyBot\Myfile

I guess what you're looking for is F:\MyBot\ $+ $nick $+ .ini
Posted By: Kooky Re: Scripting create an ini file? - 11/11/14 01:29 AM
Well I think I modified it how you suggested, but it's still not working.

Code:
on *:text:!Name*:#MyRoom: { 
  writeini -n $qt(F:\MyBot\ $+ $nick $+ .ini) Name $2-
  writeini -n $qt(F:\MyBot\ $+ $nick $+ .ini) Register Name on
  notice $nick Your character name is registered. Step 2: $2- $+ , Get ready for more!
}
Posted By: Kooky Re: Scripting create an ini file? - 11/11/14 11:07 PM
If it helps any, I'm using mIRC v6.2 for the shell of my bot.
Posted By: westor Re: Scripting create an ini file? - 11/11/14 11:14 PM
6.2 ? since 2000 version we have 2014 LOL!!! there is 7.36 and 7.37 beta man please go and update your mirc version ! immediately!!!!!!
Posted By: Kooky Re: Scripting create an ini file? - 11/11/14 11:40 PM
I can't. I selected this version because no matter what I do, no matter what drive I install my bot onto, it overrides my other mIRC files located elsewhere and I lose my stuff. This version is the only version that doesn't happen with.
Posted By: Nillen Re: Scripting create an ini file? - 11/11/14 11:43 PM
Let me just ask the most basic question, did you check the portable option when installing?
Posted By: westor Re: Scripting create an ini file? - 11/11/14 11:44 PM
Try install the 7.36 and create an folder on the desktop and select the path on the install to this folder when you install select the "Install as Portable" option on the installer so the new mIRC will be created on the desktop to your new folder try replace the new mIRC.exe with the old that your bot is using. and the update will be success with not loses anything.
Posted By: Kooky Re: Scripting create an ini file? - 11/11/14 11:55 PM
Went through, updated it to the newest version as a portable.

Still the same issue. Not writing an ini.
Posted By: westor Re: Scripting create an ini file? - 12/11/14 12:16 AM
Does it provide you an error message if yes please paste it here.
Posted By: Kooky Re: Scripting create an ini file? - 12/11/14 01:52 AM
No error message. Just nothing at all.

I'm using mIRC v7.36

Edit.. On toying around, this comes up:

* /writeini: insufficient parameters (line 2, script.ini)
-
* /writeini: insufficient parameters (line 2, script.ini)

Posted By: westor Re: Scripting create an ini file? - 12/11/14 03:40 PM
Well probably the path is incorrect F:/Mybot... so try using this code it will store the register.ini file with the details that you want, it is also much safer rather the $nick $+ .ini file because there will be devices and /writeini issues because windows cannot write an file that exist on devices and if the $nick is an machine device there will be an unfixable error and will brake the code.

Code:
ON *:TEXT:!Name*:#MyRoom: { 
  writeini -n register.ini $chan $+ ~ $+ $nick Name $2-
  writeini -n register.ini $chan $+ ~ $+ $nick Register on
  notice $nick Your character name is registered. Step 2: $2- $+ , Get ready for more!
}
Posted By: Kooky Re: Scripting create an ini file? - 13/11/14 01:46 AM
But I'm trying to create an ini file for the character that's being registered, not just alter the register file. Because it's going to be used by multiple people, so multiple files need to be made, and names will be added to my register file.
Posted By: Kooky Re: Scripting create an ini file? - 14/11/14 05:03 AM
Plus I could alter it into a .chr or .txt file and that would help.
Posted By: westor Re: Scripting create an ini file? - 14/11/14 02:36 PM
The code i gave you working on multi nicknames if you want to write an extra line follow the /writeini command and replace the write things with yours.

Help Details: /help /writeini
© mIRC Discussion Forums