mIRC Home    About    Download    Register    News    Help

Print Thread
#116889 10/04/05 12:14 PM
Joined: Mar 2005
Posts: 19
W
Wishie Offline OP
Pikka bird
OP Offline
Pikka bird
W
Joined: Mar 2005
Posts: 19
Hi there, I'll just go straight onto my problem. I have a gaming bot, that is supposed to save players' score into a hash table. That, I have managed without any problems. However, I have a problem when I'm going to load the hash table from an external file when starting the bot.

Here is my code, that first saves the hash table upon command "shutdown":
Code:
on *:text:shutdown:? {
  if ( $nick == %rootn ) { hsave -o rps rps.txt | exit } 
}

So far, so good. Here is my problem though, the loading command, that is supposed to load the hash table upon starting the bot:
Code:
on *:start:{
  hload -s rps rps.txt
}

When I start the bot, I get this message as it's trying to load the hash table: "* /hload: no such table 'rps' (line 2, script.ini)". I really can't understand what I am doing wrong. Any help is greatly appreciated! laugh

Regards,
Wishie

#116890 10/04/05 12:28 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You have to make the table then load the data into the table. smile

Code:
on 1:Start: {
  hmake rps
  if ($isfile(rps.txt)) hload -s rps rps.txt
}

Last edited by SladeKraven; 10/04/05 12:33 PM.
#116891 10/04/05 12:35 PM
Joined: Mar 2005
Posts: 19
W
Wishie Offline OP
Pikka bird
OP Offline
Pikka bird
W
Joined: Mar 2005
Posts: 19
shocked Whaaaat? Hahaha, such a simple answer. Thanks SladeKraven, have a nice day! wink

Regards,
Wishie

#116892 10/04/05 12:44 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You're welcome mate. smile


Link Copied to Clipboard