Search found 56 matches

by tarrant
Tue Nov 30, 2010 11:30 am
Forum: Howtos, FAQs and Tips & Tricks
Topic: saving variables
Replies: 17
Views: 5026

Re: Weird errors

Ok, i made 2 scripts. 1. Load Vars registered event handler: sysLoadEvent in the script box: local path = getMudletHomeDir() .. "/myVariables.save" table.load( path ) 2. Save Vars registered event handler: sysExitEvent in the script box: local path = getMudletHomeDir() .. "/myVariables.save" table.s...
by tarrant
Tue Nov 30, 2010 11:30 am
Forum: Help Forum
Topic: saving variables
Replies: 17
Views: 4478

Re: Weird errors

Ok, i made 2 scripts. 1. Load Vars registered event handler: sysLoadEvent in the script box: local path = getMudletHomeDir() .. "/myVariables.save" table.load( path ) 2. Save Vars registered event handler: sysExitEvent in the script box: local path = getMudletHomeDir() .. "/myVariables.save" table.s...
by tarrant
Tue Nov 30, 2010 9:06 am
Forum: Help Forum
Topic: Function within a function
Replies: 13
Views: 3353

Re: Function within a function

yeah, all of the above assumptions are right. heh. i've shortened the line as adviced. This is in an alias. ^tbfire (\d+)?$ ammoToBuy = ammoUpperLimit - ammo function stbfire() if matches[2] and ammo <= ammoLowerLimit then send("\nstbuy " .. matches[2] .. "\n") end if matches[2] == nil and ammo <= a...
by tarrant
Tue Nov 30, 2010 6:57 am
Forum: Howtos, FAQs and Tips & Tricks
Topic: saving variables
Replies: 17
Views: 5026

Re: Weird errors

Ok, the problem is back. It didn't really go away. i just forgot i disabled the loadvars part. i put both in aliases loadvars and savevars local path = getMudletHomeDir() .. "/myVariables.save" table.save( path, myVariableTable ); display( myVariableTable ) local path = getMudletHomeDir() .. "/myVar...
by tarrant
Tue Nov 30, 2010 6:57 am
Forum: Help Forum
Topic: saving variables
Replies: 17
Views: 4478

Re: Weird errors

Ok, the problem is back. It didn't really go away. i just forgot i disabled the loadvars part. i put both in aliases loadvars and savevars local path = getMudletHomeDir() .. "/myVariables.save" table.save( path, myVariableTable ); display( myVariableTable ) local path = getMudletHomeDir() .. "/myVar...
by tarrant
Mon Nov 29, 2010 10:53 pm
Forum: Help Forum
Topic: Function within a function
Replies: 13
Views: 3353

Function within a function

Is it possible to call a function from within another function? function autoBuyAmmo() ammoTypetoBuy = ammoTypeCur if ammo ~= "" and ammo <= ammoLowerLimit then if typetoBuy == "fire" then stbfire() end if typetoBuy == "earth" then stbearth() end if typetoBuy == "lightning" then stblightning() end i...
by tarrant
Mon Nov 29, 2010 6:42 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: saving variables
Replies: 17
Views: 5026

Re: Weird errors

Not that i know of. Oddly enough, the problem went away. Don't know what happened, can't seem to re-create it.
So its all good for now. thanks.
by tarrant
Mon Nov 29, 2010 6:42 pm
Forum: Help Forum
Topic: saving variables
Replies: 17
Views: 4478

Re: Weird errors

Not that i know of. Oddly enough, the problem went away. Don't know what happened, can't seem to re-create it.
So its all good for now. thanks.
by tarrant
Sun Nov 28, 2010 10:55 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: saving variables
Replies: 17
Views: 5026

saving variables

I made an alias to local path = getMudletHomeDir() .. "/myVariables.save" table.save( path, myVariableTable ) An in a script, i have local path = getMudletHomeDir() .. "/myVariables.save" table.load( path, myVariableTable ) But once i load my variables, i get a few errors. Lua syntax error:[string "...
by tarrant
Sun Nov 28, 2010 10:55 pm
Forum: Help Forum
Topic: saving variables
Replies: 17
Views: 4478

saving variables

I made an alias to local path = getMudletHomeDir() .. "/myVariables.save" table.save( path, myVariableTable ) An in a script, i have local path = getMudletHomeDir() .. "/myVariables.save" table.load( path, myVariableTable ) But once i load my variables, i get a few errors. Lua syntax error:[string "...