• 🏆 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!

Im having trouble setting up a trigger!

Status
Not open for further replies.
Level 4
Joined
Feb 9, 2009
Messages
64
Hi im making a map that got moderated. ap0calypse sent me a trigger that could differentiate whether a player is playing offline or online. The point of this trigger is to create different start units for player 2 if offline, but create a wisp at a specified area if online. Here is the trigger that he sent me:

Game Cache - Create a game cache from SinglePlayer.w3v
Custom Script: if ( SaveGakeCache(bj_lastCreatedGameCache) == true) then
Set SingleMultiPlayer = 1
Custom Script: else
Set SingleMultiPlayer = 2
Custom Script: endif


First, I can't find "Set SingleMultiPlayer = (1,2)"
Second, WorldEditor keeps on disabling the trigger because this keeps popping up:

Script Errors
Line 97: Expected a name
Line 100: Expected a code statement
Line 101: Expected a code statement


Please help!
 
Custom Script: if ( SaveGakeCache(bj_lastCreatedGameCache) == true) then
should be
Custom Script: if ( SaveGameCache(bj_lastCreatedGameCache) == true) then
[Typo error, which I think will enable the rest of the code]

The "SingleMultiPlayer" is a variable (an Integer-type, possibly), it's the action "Set Variable"/ press Ctrl + B. For more about variables:
[•] http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
 
Level 3
Joined
Feb 23, 2010
Messages
73
lol it seems this happens all too often. If you take a trigger from another source (if it wasnt made specifically for your map), then you always need to check every parameter very carefully. 99/100 times this happens from a typo, or just because somebody forgot to define a global variable. Always check for typos before you panic!
 
Status
Not open for further replies.
Top