Is there a constant player variable for player one?
Have you tried and tested that?A constant would return Player(0) in vjass from inlining, so like
[ljass]DisplayTestToPlayer(GetLocalPlayer(), 0, 0, GetPlayerName(PLAYER_ONE))[/ljass]
would be like
[ljass]DisplayTestToPlayer(GetLocalPlayer(), 0, 0, GetPlayerName(Player(0)))[/ljass]
rather than using the variable
This:Have you tried and tested that?
//=========================================================================== // Trigger: Untitled Trigger 001 //=========================================================================== //TESH.scrollpos=0 //TESH.alwaysfold=0 function RAWR takes nothing returns nothing call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, GetPlayerName(playerOne)) endfunction//=========================================================================== function InitCustomTriggers takes nothing returns nothing call InitTrig_StrSteal() //Function not found: call InitTrig_Untitled_Trigger_001() endfunction
Personally I even doubt that that's true. I'd assume this would work just fine:I don't believe you can initialize players in the globals block
You can in fact initialize players in globals block ^.^. I do it all the time.But have not tried it myself.
I apologize ; ), seem to keep forgetting about that with all of the work I've been doing o-o.Nestharus, as far as I'm concerned, it was never true. I don't have any evidence that there was ever a bug in JassHelper about inlining constant handles (but perhaps there was), but you've been repeating it for the last year or so. I just wanted to know if you actually had any evidence or if you were just repeating unfounded misinformation again.
Yea, that's what I had read too ; D.But i have read that wc3mapoptimizer inlines all constants, regardless it's an handle or not (never tested, simply because never used it)
I was probably confusing jasshelper or w/e with wc3mapoptimizer since I always use the optimizer when I'm releasing a map ;o.- Added "Inline constant globals" method.
I'll give it a shot.Can we have this tested?
scope InlineTest globals constant real Real = 3.0 constant integer Integer = 3 constant string String = "Three" constant boolean Boolean = false constant player PLAYER = Player(0) constant unit UNIT = CreateUnit(Player(0),'hfoo',0,0,0) constant unit UNIT_TEST_ABOVE = CreateUnit(PLAYER,Integer,Real,Real,Real) constant unit UNIT_WEIRD = bj_lastCreatedUnit endglobals function TheGoodTheBadAndTheUgly_IsTheGreatestFilmEver takes nothing returns nothing local real r = Real local integer i = Integer local string s = String local boolean b = Boolean local player p = PLAYER local unit u = UNIT local unit uta = UNIT_TEST_ABOVE local unit uw = UNIT_WEIRD endfunction endscope