Page 1 of 1

Handle error.

Posted: November 7th, 2009, 3:37 pm
by Risen
I'm restoring this map to work with 1.24b, but it doesn't use h2i, it simply sets a global handle variable to an event a few times.. not sure what to do here.

Code: Select all

function A6 takes trigger A7,rect r returns event
   local region A8=CreateRegion()
   call RegionAddRect(A8,r)
   set udg_handle01=TriggerRegisterLeaveRegion(A7,A8,null)
   set A8=null
   return udg_handle01
endfunction

Re: Handle error.

Posted: November 7th, 2009, 3:42 pm
by Ken
This is Soldiers, right?

Re: Handle error.

Posted: November 7th, 2009, 4:05 pm
by Risen
It's Tree Tag Infernals revenge, I've been wanting to play it for two years, but I could never find it. :)

Re: Handle error.

Posted: November 7th, 2009, 4:10 pm
by Ken
Arrr... What you could do is make this function:

function h2h takes handle h returns handle
return h
endfunction

And call that whenever the function would return the handle itself.

Also, try opening the map in WE (Jass NewGen works well) and attempt to save it right away. It'll show you whatever code is causing problems, in case it's more than just that.

Re: Handle error.

Posted: November 7th, 2009, 4:29 pm
by Risen
JNGP saves without error, I'm positive it's the new patch.

& i'll try that.

EDIT: It didn't work, I did..

Code: Select all

return h2h(udg_handle01)

Re: Handle error.

Posted: November 7th, 2009, 4:41 pm
by Ken
Nonono, call h2h(handle01). And probably put return null after that, so it sees the function as returning a value from itself.

Re: Handle error.

Posted: November 7th, 2009, 4:48 pm
by Risen
OH.

My bad. Rofl.

EDIT: Nope, "Game Not Found".