• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Vote Kick

Status
Not open for further replies.
Level 10
Joined
Jun 20, 2017
Messages
329
Any ideas + Rep

Why does this system make a fatal error?
  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -vk as A substring
      • Player - Player 2 (Blue) types a chat message containing -vk as A substring
      • Player - Player 3 (Teal) types a chat message containing -vk as A substring
      • Player - Player 4 (Purple) types a chat message containing -vk as A substring
      • Player - Player 5 (Yellow) types a chat message containing -vk as A substring
      • Player - Player 6 (Orange) types a chat message containing -vk as A substring
      • Player - Player 7 (Green) types a chat message containing -vk as A substring
      • Player - Player 8 (Pink) types a chat message containing -vk as A substring
      • Player - Player 9 (Gray) types a chat message containing -vk as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -vk as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -vk as A substring
      • Player - Player 12 (Brown) types a chat message containing -vk as A substring
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 3)) Equal to (==) -vk
        • Then - Actions
          • Set Integer_Kick = (Integer((Substring((Entered chat string), 5, 6))))
          • Set Integer_Kick = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Player(Integer_Kick)) slot status) Equal to (==) Is playing
                • ((Triggering player) is an ally of (Player(Integer_Kick))) Equal to (==) True
                • Integer_Kick Less than or equal to (<=) 3
              • Then - Actions
                • Game - Defeat (Picked player) with the message: Defeat!
                • Trigger - Run Player leaves <gen> (checking conditions)
              • Else - Actions
        • Else - Actions
 
Last edited:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Firstly, your editor is not supported anymore. Unless you're running an old version of wc3. I do not think that helps.

Secondly, Game - Defeat (Picked player) with the message: Defeat! there is no picked player in that trigger.

Thirdly:
set.gif
Set Integer_Kick = (Integer((Substring((Entered chat string), 5, 6))))
set.gif
Set Integer_Kick = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))

does nothing since you overwrite.

I do not think this should cause a crash but wont hurt to fix.
 
Status
Not open for further replies.
Top