Tremulous Forum
General => Troubleshooting => Topic started by: Roanoke on November 26, 2008, 03:26:57 am
-
To save typing on my binds, I used seta to make variables through which I buy stuff I always do. Here is a specific problem.
//Buying vars
seta arm "buy bsuit; buy larmour; buy helmet;" //Choose armor
seta weapons "buy rifle;" //Weapon failsafe
seta def "sell weapons; sell upgrades;" //Reset everything
//Buying Binds
bind f3 "res; arm; weapons; echo Rifle loaded." //Offensive
It tells me that 'You can't carry multiple items of the same type' or something. Yes, bsuit does not work with larmour, but neither the bsuit nor the larmour is bought. Ideally, the bsuit would be bought if possible, otherwise a larmour and helmet.
-
//Buying vars
seta arm "buy bsuit;wait;buy larmour;buy helmet;" //Choose armor
seta weapons "buy rifle;" //Weapon failsafe
seta def "sell weapons; sell upgrades;" //Reset everything
//Buying Binds
bind f3 "vstr res;vstr arm;vstr weapons; echo Rifle loaded. Superpie rocks." //Offensive
-
Hm, thanks, I'll try that out.
Edit: Works, but I get several lines of 'Must be near a powered armory' when I exec the file because of the seta lines.
-
I wasn't quite sure why you used seta, I haven't had to find a use for it. Replace 'seta' with 'set' and it should work fine, I just didn't mess with it because I thought you had used it for a reason.
-
Now it's changed to 'must be living to use this command.'
-
Typical spelling error (no semicolon at the end of vstrs please(!) and mixed up variable names):
//Buying vars
seta arm "buy bsuit;wait;buy larmour;buy helmet" //Choose armor
seta weapons "buy rifle;" //Weapon failsafe
seta def "sell weapons; sell upgrades;" //Reset everything
//Buying Binds
bind f3 "vstr res;vstr arm;vstr weapons; echo Rifle loaded. Superpie rocks." //Offensive
It is either "res" or "def". Seemed as if you changed your mind inbetween writing those two vstrs.
Also, the vstr "weapons" makes no sense at all.
My suggestion:
bind f7 "vstr choosearmor"
set choosearmor "vstr armor1"
set armor1 "sell upgrades; buy bsuit; echo Battlesuit bought; set choosearmor vstr armor2"
set armor2 "sell upgrades; buy larmor; buy helmet; echo Light armor set bought; set choosearmor vstr armor1"
-
That's old code, so res and def are one in my current code.
I think I can live with errors.