1. Extract War3map.j2. Find Native- Native alway under endglobals so you can find them there
Here is in Example Map
Quote:
native RequestExtraBooleanData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns boolean
native RequestExtraIntegerData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns integer
native DzAPI_Map_SaveServerValue takes player whichPlayer,string key,string value returns boolean
native DzAPI_Map_GetServerValue takes player whichPlayer,string key returns string
native DzAPI_Map_Stat_SetStat takes player whichPlayer,string key,string value returns nothing
native DzAPI_Map_IsRPGLobby takes nothing returns boolean
native DzAPI_Map_GetMapLevel takes player whichPlayer returns integer
native DzAPI_Map_HasMallItem takes player whichPlayer,string key returns boolean
native EXGetUnitAbility takes unit u,integer abilcode returns ability
native EXGetAbilityDataReal takes ability abil,integer level,integer data_type returns real
native EXSetAbilityDataReal takes ability abil,integer level,integer data_type,real value returns boolean
native EXSetItemDataString takes integer itemcode,integer data_type,string value returns boolean
native EXGetEventDamageData takes integer edd_type returns integer
native EXSetEventDamage takes real amount returns boolean
3.Convert Native to Function- You can copy those Native into a new file for easy to see and not mess with the function inside map
change all "native" into "function" and put endfunction under them
Quote:
function DzAPI_Map_SaveServerValue takes player whichPlayer,string key,string value returns nothing
endfunction
function DzAPI_Map_GetServerValue takes player whichPlayer,string key returns string
endfunction
function DzAPI_Map_Stat_SetStat takes player whichPlayer,string key,string value returns nothing
endfunction
function DzAPI_Map_IsRPGLobby takes nothing returns boolean
endfunction
function DzAPI_Map_GetMapLevel takes player whichPlayer returns integer
endfunction
function DzAPI_Map_HasMallItem takes player whichPlayer,string key returns boolean
endfunction
function EXGetUnitAbility takes unit u,integer abilcode returns ability
endfunction
function EXGetAbilityDataReal takes ability abil,integer level,integer data_type returns real
endfunction
function EXSetAbilityDataReal takes ability abil,integer level,integer data_type,real value returns boolean
endfunction
function EXSetItemDataString takes integer itemcode,integer data_type,string value returns boolean
endfunction
function EXGetEventDamageData takes integer edd_type returns integer
endfunction
function EXSetEventDamage takes real amount returns boolean
endfunction
4. Valid Function and Syntax Fix- Read and understand function ,for example this :
DzAPI_Map_SaveServerValue , Why we need connect to there server when you play not in there server .
DzAPI_Map_GetServerValue , It's get something from the server and return string . This need you look around the code that call this . In example map i return "dummystring"
Okay , here is the function after make it valid and syntax fix
Quote:
function DzAPI_Map_SaveServerValue takes player whichPlayer,string key,string value returns nothing
endfunction
function DzAPI_Map_GetServerValue takes player whichPlayer,string key returns string
return "dummystring"
endfunction
function DzAPI_Map_Stat_SetStat takes player whichPlayer,string key,string value returns nothing
endfunction
function DzAPI_Map_IsRPGLobby takes nothing returns boolean
return true
endfunction
function DzAPI_Map_GetMapLevel takes player whichPlayer returns integer
return 5
endfunction
function DzAPI_Map_HasMallItem takes player whichPlayer,string key returns boolean
return false
endfunction
function EXGetUnitAbility takes unit u,integer abilcode returns ability
return null
endfunction
function EXGetAbilityDataReal takes ability abil,integer level,integer data_type returns real
return .0
endfunction
function EXSetAbilityDataReal takes ability abil,integer level,integer data_type,real value returns boolean
return false
endfunction
function EXSetItemDataString takes integer itemcode,integer data_type,string value returns boolean
return false
endfunction
function EXGetEventDamageData takes integer edd_type returns integer
return 0
endfunction
function EXSetEventDamage takes real amount returns boolean
return false
endfunction
5. Syntax Check(Optional)- Get Pjass.exe , Common.j , Common.ai , Blizzard.j from Jass Craft Folder or you can get them from Hiveworkshop and War3.mpq . Put them in a folder with War3map.j
Create a .cmd , input this :
pjass common.j common.ai Blizzard.j War3map.j >Error.txt
Then run it , then open Error.txt if you see error that not related to your edit that you did . Ignore it and you done
If you got those $ error , you know what to do right ? Fukki Hex Fixer is ur friend here
Here is the error for Example War3map.j
Quote:
Parse successful: 2418 lines: common24.j
Parse successful: 2583 lines: common24.ai
Parse successful: 10230 lines: Blizzard24.j
War3map.j:3204: Functions passed to Filter or Condition must return a boolean
War3map.j:3205: Functions passed to Filter or Condition must return a boolean
War3map.j:3206: Functions passed to Filter or Condition must return a boolean
War3map.j:3207: Functions passed to Filter or Condition must return a boolean
War3map.j:3208: Functions passed to Filter or Condition must return a boolean
War3map.j:3209: Functions passed to Filter or Condition must return a boolean
War3map.j failed with 6 errors
Parse failed: 6 errors total
Look legit ya
Notes : Don't use fix hex war3map.j , use the base one . Fix Hex War3map.j for syntax check only
6. Import and Test- Just Import the file back to the map , Compact Archive or Vex Optimizer if you want
- Test and feel your work