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

[vJASS] Equipment v2.5.2 save problems

Status
Not open for further replies.
Level 1
Joined
Jan 23, 2015
Messages
160
Hey everyone!

http://www.hiveworkshop.com/threads/equipment-v2-5-2.243917/
http://www.hiveworkshop.com/threads/equipment-v2-5-2.243917/
Trying to implement BPower's system Equipment v2.5.2 and when I convert script, nearly every trigger will have some problem when I try save it. Has anyone successfully (and preferably recently) installed this system into their map? Every time I save in NewGen after importing Equipment v2.5.2 I get something along these lines (different for each one, slowly disabled things one by one, most of them have a similar error message)

"Line 199: Missing Requirement: Optional (Libraries cannot require scopes)"

JASS:
static if DEBUG_MODE then
  private struct Fields extends array
  static constant string COLOR_RED = "|cffff0000"
  static constant string COLOR_YELLOW = "|cffffff00"
  static string lastError = null
  endstruct
   
  private function Pause takes nothing returns nothing
  call PauseGame(true)
  endfunction
   
  private function ThrowMessage takes string libraryName, string functionName, string objectName, integer objectInstance, string description, string errorType, string color returns nothing
  local string str
   
  local string color_braces = "|cff66FF99"
  local string orange = "|cffff6600"
   
  set str = "->\n-> " + color_braces + "{|r " + "Library" + color_braces + "(" + orange + libraryName + color_braces + ")"
  if (objectName != null) then
  if (objectInstance > 0) then
  set str = str + "|r.Object" + color_braces + "(" + orange + objectName + color_braces + " (|rinstance = " + orange + I2S(objectInstance) + color_braces + ") )" + "|r." + "Method" + color_braces + "(" + orange + functionName + color_braces + ")"
  else
  set str = str + "|r.Object" + color_braces + "(" + orange + objectName + color_braces + ")|r." + "Method" + color_braces + "(" + orange + functionName + color_braces + ")"
  endif
  else
  set str = str + "|r." + "Function" + color_braces + "(" + orange + functionName + color_braces + ")"
  endif
   
  set str = str + color_braces + " }|r " + "has thrown an exception of type " + color_braces + "(" + color + errorType + color_braces + ")|r."
   
  set Fields.lastError = str + "\n->\n" + "->  " + color + description + "|r\n->"
  endfunction
   
  function ThrowError takes boolean expression, string libraryName, string functionName, string objectName, integer objectInstance, string description returns nothing
  if (Fields.lastError != null) then
  set objectInstance = 1/0
  endif
   
  if (expression) then
  call ThrowMessage(libraryName, functionName, objectName, objectInstance, description, "Error", Fields.COLOR_RED)
  call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,Fields.lastError)
  call TimerStart(CreateTimer(), 0, true, function Pause)
  set objectInstance = 1/0
  endif
  endfunction (/jass)

  function ThrowWarning takes boolean expression, string libraryName, string functionName, string objectName, integer objectInstance, string description returns nothing
  if (Fields.lastError != null) then
  set objectInstance = 1/0
  endif
 
Level 1
Joined
Jan 23, 2015
Messages
160
just checked, yes I do. It was in the original demo map BP uploaded, which I exported all of those triggers and imported them into a new map. But it won't save properly on mine, or even if I start a blank map and try it :\
 
Level 1
Joined
Jan 23, 2015
Messages
160
Sorry folks, first time doing summer semester and it is really a kick in the butt.

@IcemanBo I have already done what you suggested before I posted the question, actually. My test map is just scattered ideas on a terrain, you would lose zero relevant information making a brand new map, downloading the system and importing into that map. If you are able to save your mapa fter taking exactly what the system's demo map has, and you try to save, I think you'll see what I'm talking about.

If however you successfully save then I'm in a whole new world of confusion. That is why I was asking if you or anyone really could just try what I asked. Make any old map, export the system into it, and see if you can successfully save.

I have already gone through one by one disabling each trigger, they each have a problem that is very similar to the line put in the OP.


Again, this is addressed to anyone who wants to give it a shot. Sorry it took a while to get back to this, I've just been adjusting to a fast pace schedule
 
Status
Not open for further replies.
Top