mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2016
Posts: 2
P
Bowl of petunias
OP Offline
Bowl of petunias
P
Joined: Jun 2016
Posts: 2
Hello i'm still new to mIRC scripting, i'm having a problem and was hoping to get a little help. I am creating a small chat game for my twitch channel and each of my veiwers will have thier own inventory text file. When the chat command is used it will play or read the file saved for that user, like read(c:/prophetcable_inventory.txt), but i need it to pick each users ID instead of just mine like read($nick_inventory.txt) unfortunealy i cannot get this line to work and know that there is a way seeing as i also use ankhbot, which is a twitch bot built on irc (ithink) and when i do $user_inventory.txt in ankhbot it works. Any ideas or do i just need to get better at coding? :P thanks

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
A better way to do this would probably be to use an ini file. You can use a single ini for everyone and it should be easier to read and edit than a normal text file.

Look up /writeini and $readini in the help file.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Jun 2016
Posts: 2
P
Bowl of petunias
OP Offline
Bowl of petunias
P
Joined: Jun 2016
Posts: 2
Thanks i will definitely check that out, still a lot of learning to do. BTW i did figure out who to do what i asked finally just by gaining more experience with the scripting language i should have used c:/ $+ $nick $+ _inventory.txt for anyone out there that may be curious, i will probably however use an INI instead since i do like the structure of it. As long as i can figure out how to add things to sections as opposed to just overwriting them


Link Copied to Clipboard