• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Number

Status
Not open for further replies.
Level 20
Joined
Apr 14, 2012
Messages
2,901
I'm not sure what you mean yet but is it something like this: ?
  • Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing -Num5 as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 5)) Equal to (String(Integer))
        • Then - Actions
          • Game - Display to (All players) the text: (String(Integer))
        • Else - Actions
This does not work yet btw
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
A null value will return as '0'.
Meaning that, if a Player enters a value of 0, it will be treated as non-number value has been entered.
Other than that, the system can differentiate between number and anything (sign, symbol, etc).

Instruction:
1. Just enter any value (via chat) and it will show you a message whether you have entered a number or not.

Examples:
1234 is acceptable
1001 is acceptable
hey there is not acceptable
i1a2m is not acceptable
huhuh1003 is not acceptable
1003hello1002 will only accept the values before "hello"
0000000089 is acceptable (returned value is 89)
 

Attachments

  • NumberDifference.w3x
    16.2 KB · Views: 37
Level 20
Joined
Apr 14, 2012
Messages
2,901
A null value will return as '0'.
Meaning that, if a Player enters a value of 0, it will be treated as non-number value has been entered.
Other than that, the system can differentiate between number and anything (sign, symbol, etc).

Instruction:
1. Just enter any value (via chat) and it will show you a message whether you have entered a number or not.

Examples:
1234 is acceptable
1001 is acceptable
hey there is not acceptable
i1a2m is not acceptable
huhuh1003 is not acceptable
1003hello1002 will only accept the values before "hello"
0000000089 is acceptable (returned value is 89)

Okay... you make very good systems defskull =D

About your PI system: I thought I could change it to check numbers from 1 to 9999 (for example)... because I didn't know what the_blood is going to use it for...

But then again your NumberDifference is much better.
 
Level 18
Joined
May 11, 2012
Messages
2,103
A null value will return as '0'.
Meaning that, if a Player enters a value of 0, it will be treated as non-number value has been entered.
Other than that, the system can differentiate between number and anything (sign, symbol, etc).

Instruction:
1. Just enter any value (via chat) and it will show you a message whether you have entered a number or not.

Examples:
1234 is acceptable
1001 is acceptable
hey there is not acceptable
i1a2m is not acceptable
huhuh1003 is not acceptable
1003hello1002 will only accept the values before "hello"
0000000089 is acceptable (returned value is 89)

as always, you know what you're doing xD
Thank you so much, the problem was that when the player entered let's say ''.'' or any sign or letter, the game crashed, it didn't returned null...
But now, somehow, it doesn't crashes anymore, just returns null :D
 
Status
Not open for further replies.
Top