# [Solved]Vote Kick

Status
Not open for further replies.

#### AlwaysAndForever

Level 10
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
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 Integer_Kick = (Integer((Substring((Entered chat string), 5, 6))))
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.

Replies
3
Views
856
Replies
1
Views
757
Replies
7
Views
650
Replies
2
Views
677
[Trigger] Fatal Error?
Replies
10
Views
981