Hi,
I have read what I can find in the forum, gone to lua.org, gone to other lua forums and I can't figure out what I'm doing wrong or how to do what I want to.
I'm rewriting my combat system for aetolia, what I'm trying to do is have an alias that allows you to add certain data to a table. In this case it's keeping track of weapons. The fields are character name, weapon type, which hand and weapon number. I can enter these into the table fine but if I go to add a second weapon it's not appending to the table but overwriting it. I tried working with insert and get all kinds of errors, what is working is with the table name being weapons.
weapons.name = charname
weapons.type = temptype
weapons.hand = weaponhand
weapons.number = tempnumber
that adds it fine but it's overwriting the other records. Now in my script file I have weapons = { } to initialize the table, is it erasing the contents of the table? If so how do I keep the data in the table and load it when I start mushclient?
The second issue is, if the data is being over written my buffer tables are no use to me and I just spent three days coding for nothing. I have afflictions, defenses and so forth going into a table to temporarily store the variable, then on the prompt set the variables and clear the table, however there may be up to four afflictions before a new prompt so if it's over writing i'm only going to be storing the last affliction I need all of them.
Please help I'm very frustrated and having a hard time finding examples I can understand or anything that really relates.
I have read what I can find in the forum, gone to lua.org, gone to other lua forums and I can't figure out what I'm doing wrong or how to do what I want to.
I'm rewriting my combat system for aetolia, what I'm trying to do is have an alias that allows you to add certain data to a table. In this case it's keeping track of weapons. The fields are character name, weapon type, which hand and weapon number. I can enter these into the table fine but if I go to add a second weapon it's not appending to the table but overwriting it. I tried working with insert and get all kinds of errors, what is working is with the table name being weapons.
weapons.name = charname
weapons.type = temptype
weapons.hand = weaponhand
weapons.number = tempnumber
that adds it fine but it's overwriting the other records. Now in my script file I have weapons = { } to initialize the table, is it erasing the contents of the table? If so how do I keep the data in the table and load it when I start mushclient?
The second issue is, if the data is being over written my buffer tables are no use to me and I just spent three days coding for nothing. I have afflictions, defenses and so forth going into a table to temporarily store the variable, then on the prompt set the variables and clear the table, however there may be up to four afflictions before a new prompt so if it's over writing i'm only going to be storing the last affliction I need all of them.
Please help I'm very frustrated and having a hard time finding examples I can understand or anything that really relates.