Hi evryone, i know i'm a ghost on this community but since you are one of the most active one i often come by to seek your knowledge
Today i have a problem, indeed my map does not want to save for 2 line of jass code :
1) function CodeGen_ConvertUnit takes integer id returns integer
2) function CodeGen_ConvertUnit takes integer id returns integer
yes its the same one but for some reason the error is linked to thoses 2 do i need to use another variable for each of them or not : trying to customize the "codegen" system to add a bag to the save able list of unit.
[/SIZE]
The code : (injass)
function CodeGen_SaveToDisk takes string loadcode, string filename returns nothing
call PreloadGenClear()
call PreloadGenStart()
call Preload(loadcode)
call PreloadGenEnd(filename)
call ClearSelection()
endfunction
function CodeGen_Init takes nothing returns nothing
local integer i = 1
local integer b = udg_SaveLoad_Base
local integer m = udg_SaveLoad_MaxValue
loop
exitwhen i >= udg_SaveLoad_MaxValue
set udg_SaveLoad_Char = SubString(udg_SaveLoad_Alphabet, i, i+1)
set i = i + 1
endloop
set udg_SaveLoad_Alphabet = SubString(udg_SaveLoad_Alphabet, 0, 1) + SubString(udg_SaveLoad_Alphabet, m + 1, b)
set udg_SaveLoad_Base = b - m
endfunction
function CodeGen_ConvertUnit takes integer id returns integer
local integer i = 1
loop
exitwhen i > udg_SaveLoad_HeroCount
if (id == udg_SaveLoad_Hero) then
return i
endif
set i = i + 1
endloop
return 0
endfunction
function CodeGen_ConvertUnit takes integer id returns integer
local integer i = 1
loop
exitwhen i > udg_SaveLoad_bagCount
if (id == udg_SaveLoad_bag) then
return i
endif
set i = i + 1
endloop
return 0
endfunction
Once again i'l be gratefull if you could teach me a thing or two in helping me to resolve this mysterious problem !
Today i have a problem, indeed my map does not want to save for 2 line of jass code :
1) function CodeGen_ConvertUnit takes integer id returns integer
2) function CodeGen_ConvertUnit takes integer id returns integer
yes its the same one but for some reason the error is linked to thoses 2 do i need to use another variable for each of them or not : trying to customize the "codegen" system to add a bag to the save able list of unit.
[/SIZE]
The code : (injass)
function CodeGen_SaveToDisk takes string loadcode, string filename returns nothing
call PreloadGenClear()
call PreloadGenStart()
call Preload(loadcode)
call PreloadGenEnd(filename)
call ClearSelection()
endfunction
function CodeGen_Init takes nothing returns nothing
local integer i = 1
local integer b = udg_SaveLoad_Base
local integer m = udg_SaveLoad_MaxValue
loop
exitwhen i >= udg_SaveLoad_MaxValue
set udg_SaveLoad_Char = SubString(udg_SaveLoad_Alphabet, i, i+1)
set i = i + 1
endloop
set udg_SaveLoad_Alphabet = SubString(udg_SaveLoad_Alphabet, 0, 1) + SubString(udg_SaveLoad_Alphabet, m + 1, b)
set udg_SaveLoad_Base = b - m
endfunction
function CodeGen_ConvertUnit takes integer id returns integer
local integer i = 1
loop
exitwhen i > udg_SaveLoad_HeroCount
if (id == udg_SaveLoad_Hero) then
return i
endif
set i = i + 1
endloop
return 0
endfunction
function CodeGen_ConvertUnit takes integer id returns integer
local integer i = 1
loop
exitwhen i > udg_SaveLoad_bagCount
if (id == udg_SaveLoad_bag) then
return i
endif
set i = i + 1
endloop
return 0
endfunction
Once again i'l be gratefull if you could teach me a thing or two in helping me to resolve this mysterious problem !
Last edited: