Author Topic: Armour restore script  (Read 3794 times)

Peavy

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Armour restore script
« Reply #15 on: June 05, 2013, 08:45:03 pm »
Can you please tell me what I did wrong so I don't do it again?

Peavy

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Armour restore script
« Reply #16 on: June 05, 2013, 10:27:13 pm »
Can someone tell me what I did wrong?

Mido_Pop

  • Full Member
  • ***
  • Posts: 168
  • Karma: +6/-20
  • The_Pops ( War )
    • View Profile
Re: Armour restore script
« Reply #17 on: June 06, 2013, 08:01:57 am »
 :( Man, You Can see The Error By Using Your Eyes  :(



Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Armour restore script
« Reply #18 on: June 06, 2013, 04:36:08 pm »
Well, I see in your first example that you capitalized the "A" in the word "Armour". Because of this, the player would be required to enter /Armour exactly (with the capital A).

Here's a suggestion. Use the following snippet to allow case-insensitive commands:
Code: [Select]
if( cmd.tolower() == "armour" )Just be sure to make the command string that you are checking for is lowercase when you script it. ( Referring to the "armour" part ).

I'm not sure if this is your problem, but I hope this helps!

Peavy

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Armour restore script
« Reply #19 on: June 07, 2013, 09:26:24 pm »
Well, I see in your first example that you capitalized the "A" in the word "Armour". Because of this, the player would be required to enter /Armour exactly (with the capital A).

Here's a suggestion. Use the following snippet to allow case-insensitive commands:
Code: [Select]
if( cmd.tolower() == "armour" )Just be sure to make the command string that you are checking for is lowercase when you script it. ( Referring to the "armour" part ).

I'm not sure if this is your problem, but I hope this helps!
Alright, thanks. I hadn't known that commands were so case sensitive.
So the entire time the command actually worked?

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Armour restore script
« Reply #20 on: June 08, 2013, 04:59:47 am »
Yes, it should've worked the whole time.

Peavy

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Armour restore script
« Reply #21 on: June 08, 2013, 09:57:53 pm »
Yes, it should've worked the whole time.
o
Oh wow, I feel dumb now.
Alright guys, thanks for the help. I'll be sure to note down that things are case sensitive

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Armour restore script
« Reply #22 on: June 17, 2013, 05:15:44 am »
Personally I would also recommend including an alias to the command also, as American players often spell that word as "armor", and British players spell it as "armour". The variation in the English dialects may throw some people off. :)

 

© Liberty Unleashed Team.