• 🏆 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] 6 Compile errors: Expected a name

Status
Not open for further replies.
Level 2
Joined
Jul 10, 2013
Messages
13
  • SystemToolsCryptKeyInit
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 0 to (keybuffer_size - 1), do (Actions)
        • Loop - Actions
          • Set keybuffer[(Integer A)] = keybuffer_default[(Integer A)]
      • For each (Integer A) from 0 to ((Length of s) - 1), do (Actions)
        • Loop - Actions
          • Custom script: set udg_keybuffer[ModuloInteger(GetForLoopIndexA(), udg_keybuffer_size)] = bxor( udg_keybuffer[ModuloInteger(GetForLoopIndexA(), udg_keybuffer_size)], B642I(SubStringBJ(udg_s, GetForLoopIndexA() + 1, GetForLoopIndexA() + 1)), 6 )

  • SystemToolsCrypt
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 0 to (Size - 1), do (Actions)
        • Loop - Actions
          • Custom script: set udg_buf[GetForLoopIndexA()] = bxor( udg_buf[GetForLoopIndexA()], udg_keybuffer[ModuloInteger(GetForLoopIndexA(), udg_keybuffer_size)], 6 )

  • SystemToolsDecrypt
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 0 to (Size - 1), do (Actions)
        • Loop - Actions
          • Custom script: set udg_buf[GetForLoopIndexA()] = bxor( udg_buf[GetForLoopIndexA()], udg_keybuffer[ModuloInteger(GetForLoopIndexA(), udg_keybuffer_size)], 6 )

  • Save
    • Events
      • Player - Player 1 (Red) types a chat message containing -save as An exact match
      • Player - Player 2 (Blue) types a chat message containing -save as An exact match
      • Player - Player 3 (Teal) types a chat message containing -save as An exact match
      • Player - Player 4 (Purple) types a chat message containing -save as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -save as An exact match
      • Player - Player 6 (Orange) types a chat message containing -save as An exact match
      • Player - Player 7 (Green) types a chat message containing -save as An exact match
      • Player - Player 8 (Pink) types a chat message containing -save as An exact match
      • Player - Player 9 (Gray) types a chat message containing -save as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -save as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -save as An exact match
      • Player - Player 12 (Brown) types a chat message containing -save as An exact match
    • Conditions
    • Actions
      • Set Unit = (Random unit from (Units currently selected by (Triggering player)))
      • Trigger - Run CustomBufferFuncInit (checking conditions)
      • Set buf_size = 0
      • Set idx_hi = 0
      • Set idx_lo = 5
      • For each (Integer A) from 0 to 63, do (Actions)
        • Loop - Actions
          • Set buf[(Integer A)] = 0
      • Set a_idx = 0
      • Custom script: loop
      • Custom script: exitwhen udg_a_idx > udg_CustomBufferCount - 1
      • Set Size = 0
      • Trigger - Run CustomBufferFuncSaveValue[a_idx] (checking conditions)
      • Set Value = (Min(Value, (power2[Size] - 1)))
      • Set Value = (Max(0, Value))
      • Set a = (Size - 1)
      • Custom script: loop
      • Custom script: exitwhen udg_a < 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • idx_lo Equal to -1
        • Then - Actions
          • Set idx_lo = 5
          • Set idx_hi = (idx_hi + 1)
        • Else - Actions
      • Set b = (Value / power2[a])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • b Not equal to 0
        • Then - Actions
          • Set buf[idx_hi] = (buf[idx_hi] + power2[idx_lo])
          • Set Value = (Value - power2[a])
        • Else - Actions
      • Set idx_lo = (idx_lo - 1)
      • Set a = (a - 1)
      • Custom script: endloop
      • Set a_idx = (a_idx + 1)
      • Custom script: endloop
      • Set Size = (idx_hi + 1)
      • Custom script: set udg_Size = udg_Size + CodeAddChecksum(udg_Size, udg_keycrc_size6, udg_keycrc)
      • Set s = CryptInitKey
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Length of (Name of (Triggering player))) mod 2) Equal to 0
        • Then - Actions
          • For each (Integer A) from 1 to 2, do (Actions)
            • Loop - Actions
              • Set s = (s + ((Name of (Triggering player)) + w))
        • Else - Actions
          • For each (Integer A) from 1 to 2, do (Actions)
            • Loop - Actions
              • Set s = (s + (Name of (Triggering player)))
      • Trigger - Run SystemToolsCryptKeyInit <gen> (checking conditions)
      • Trigger - Run SystemToolsCrypt <gen> (checking conditions)
      • Set s = <Empty String>
      • For each (Integer A) from 0 to (Size - 1), do (Actions)
        • Loop - Actions
          • Set s = (s + basearr[buf[(Integer A)]])
      • Game - Display to (All players) for 30.00 seconds the text: (|cffffcc00Code: |r + s)

  • Load
    • Events
      • Player - Player 1 (Red) types a chat message containing -load as A substring
      • Player - Player 2 (Blue) types a chat message containing -load as A substring
      • Player - Player 3 (Teal) types a chat message containing -load as A substring
      • Player - Player 4 (Purple) types a chat message containing -load as A substring
      • Player - Player 5 (Yellow) types a chat message containing -load as A substring
      • Player - Player 6 (Orange) types a chat message containing -load as A substring
      • Player - Player 7 (Green) types a chat message containing -load as A substring
      • Player - Player 8 (Pink) types a chat message containing -load as A substring
      • Player - Player 9 (Gray) types a chat message containing -load as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -load as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -load as A substring
      • Player - Player 12 (Brown) types a chat message containing -load as A substring
    • Conditions
    • Actions
      • Trigger - Run CustomBufferFuncInit (checking conditions)
      • Set s = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
      • Custom script: call CodeParseString(udg_s)
      • Set Size = (Length of s)
      • Set s = CryptInitKey
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Length of (Name of (Triggering player))) mod 2) Equal to 0
        • Then - Actions
          • For each (Integer A) from 1 to 2, do (Actions)
            • Loop - Actions
              • Set s = (s + ((Name of (Triggering player)) + w))
        • Else - Actions
          • For each (Integer A) from 1 to 2, do (Actions)
            • Loop - Actions
              • Set s = (s + (Name of (Triggering player)))
      • Trigger - Run SystemToolsCryptKeyInit <gen> (checking conditions)
      • Trigger - Run SystemToolsDecrypt <gen> (checking conditions)
      • Custom script: set udg_i = CodeGetChecksum(udg_Size, udg_keycrc_size6, udg_keycrc)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i Equal to 0
        • Then - Actions
          • Set buf_size = 0
          • Set idx_hi = 0
          • Set idx_lo = 5
          • Set a_idx = 0
          • Custom script: loop
          • Custom script: exitwhen udg_a_idx > udg_CustomBufferCount - 1
          • Set Size = 0
          • Set firstpass = True
          • Trigger - Run CustomBufferFuncLoadValue[a_idx] (checking conditions)
          • Set Value = 0
          • Set a = (Size - 1)
          • Custom script: loop
          • Custom script: exitwhen udg_a < 0
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • idx_lo Equal to -1
            • Then - Actions
              • Set idx_lo = 5
              • Set idx_hi = (idx_hi + 1)
            • Else - Actions
          • Set b = (buf[idx_hi] / power2[idx_lo])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • b Not equal to 0
            • Then - Actions
              • Set buf[idx_hi] = (buf[idx_hi] - power2[idx_lo])
              • Set Value = (Value + power2[a])
            • Else - Actions
          • Set idx_lo = (idx_lo - 1)
          • Set a = (a - 1)
          • Custom script: endloop
          • Set firstpass = False
          • Trigger - Run CustomBufferFuncLoadValue[a_idx] (checking conditions)
          • Set a_idx = (a_idx + 1)
          • Custom script: endloop
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cffffcc00Checksum ...

  • Check
    • Events
      • Player - Player 1 (Red) types a chat message containing -check as A substring
    • Conditions
    • Actions
      • Set s = (Substring((Entered chat string), 8, (Length of (Entered chat string))))
      • Custom script: set udg_s = GetStringChecksum (udg_s, udg_keycrc_size6, udg_keycrc)
      • Game - Display to (All players) the text: (|cffffcc00Checksum: |r + s)
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
please use this then i can try to help.
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

also how am i supposed to know wat line this Error description: 1 compile error - Line 163:Expected a name corresponds to ?

u need to tell me the errors. im guessing its in ur custom scripts.

also get rid of integer A/B and make and use ur own integer. integer A/B is slower and less efficient.

wat are these triggers supposed to do ?

wat are the problems w them ?
 
Last edited:
Can you post a screenshot of the error? (or post the map)

My guess is that you forgot to copy the map header. To access the map header, open the trigger editor and look on the left window where all the triggers are listed. Click on the map name (there should be the map icon next to it, followed by the map's name, such as TestMap.w3x), and you should see a window where code can be placed.

In the original map where you were copying those triggers from, click on the map header and copy all the code there. Then open up your map and paste the code into your map header. Hopefully it will compile without any errors.
 
Status
Not open for further replies.
Top