Getting Errors when removing leaks

Admit

New Member
Reaction score
25
Im getting errors every time i use the command
Trigger:
  • call RemoveLocation (udg_Temp_Point[1])



Here is the trigger: (im getting errors on other maps too)

Trigger:
  • SetupCards
    • Events
    • Conditions
    • Actions
      • Set Temp_Point[1] = UnusedCards <gen>
      • For each (Integer A) from 1 to NumberofCards, do (Actions)
        • Loop - Actions
          • Item - Create Cards[(Integer A)] at (Center of Temp_Point[1])
          • Item - Make (Last created item) Invulnerable
          • Item - Hide (Last created item)
      • Custom script: call RemoveLocation (udg_Temp_Point[1])


The trigger works fine if i remove the "call RemoveLocation (udg_Temp_Point[1])".

Error line's:

Line 94: Invalid argument type (rect)
Line 97: Exepted 'endloop' (rect)

Im using vanilla WE (no Newgen or EGUI)
 

LordXavier

TH.net Regular
Reaction score
16
Is Temp_Point a region or point variable?
Edit: because if it's a Point variable then it should work, if not your script should be
Trigger:
  • Custom script: call RemoveRect (udg_Temp_Point[1])
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Its a region in his trigger.

Change the variable type of "temp_point" to point.

Besides that, your trigger should look like this +-
Code:
   Set Temp_Point[1] = [COLOR="Red"]Center of (UnusedCards <gen>)[/COLOR]
     For each (Integer A) from 1 to NumberofCards, do (Actions)
          o Loop - Actions
                 Item - Create Cards[(Integer A)] at [COLOR="Red"]Temp_Point[1][/COLOR]
                 Item - Make (Last created item) Invulnerable
                 Item - Hide (Last created item)
     Custom script: call RemoveLocation (udg_Temp_Point[1])

>>Edit: because if it's a Point variable then it should work, if not your script should be
But then again, it would still leak a point. :)
 

Admit

New Member
Reaction score
25
Thanks it worked, i mixed up the Region with the point... Im to tired. ^^

+rep to both of you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top