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)"
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