Using GetLocalPlayer() to show multiboard issues

LordXavier

TH.net Regular
Reaction score
16
It took me a while to figure out how to successfully use the whole GetLocalPlayer() to show my multiboard for only one player. The first time i tried it, it didn't show up for me (a good thing), but then 1 sec into the game it just closed WC3 without any error messages or anything. The second time I changed so it would show for me, when WC3 opened, screen never got past being black and some "fatal error" thingy popped up. Does anybody have any idea as to how I'd fix this? (I'm a super JASS noob, I had to use WE to change a trigger into JASS then use GUI to run the trigger)

JASS:
function Trig_Show_Multiboard_Actions takes multiboard Scoreboard returns nothing
    call MultiboardDisplay(Scoreboard,false)
    if GetLocalPlayer() == Player(3) then
        call MultiboardDisplay(Scoreboard,true)
    endif
endfunction

//===========================================================================
function InitTrig_Show_Multiboard takes nothing returns nothing
    set gg_trg_Show_Multiboard = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Show_Multiboard, function Trig_Show_Multiboard_Actions )
endfunction
 

Trollvottel

never aging title
Reaction score
262
Dont do it (creating and showing the board) on Map Init, do it when time elapsed is 0.01.
 

saw792

Is known to say things. That is all.
Reaction score
280
JASS:
function Trig_Show_Multiboard_Actions takes multiboard Scoreboard returns nothing


Action functions cannot take arguments. You will need to set Scoreboard as a global variable.
 

Sevion

The DIY Ninja
Reaction score
413
JASS:
function Trig_Show_Multiboard_Actions takes multiboard Scoreboard returns nothing


Action functions cannot take arguments. You will need to set Scoreboard as a global variable.

JASS:
call TriggerAddAction( gg_trg_Show_Multiboard, function Trig_Show_Multiboard_Actions )


He's not even trying to pass an argument when he calls it o_O'

That's a flashing red light to me.

If you have something that requires something but you don't give it, doesn't that fire an alarm saying "No, that won't work" in your head?
 

LordXavier

TH.net Regular
Reaction score
16
BUMP

That bit of trigger was made by WE and me copy and pasting. I'm quite clueless, especially to what you guys are talking about. are you saying it should take nothing return nothing?
 

Sevion

The DIY Ninja
Reaction score
413
Well, how about we start off with that trigger won't even fire. ^_^ No event, and more than likely, no other funcitons call it.
 

LordXavier

TH.net Regular
Reaction score
16
of course there's no event

I had to use WE to change a trigger into JASS then use GUI to run the trigger)

The trigger I use to make the multiboard has this at the end:
Trigger:
  • Trigger - Run Show Multiboard <gen> (checking conditions)


And it does run, it just crashed the game... <-----crashing part is what I need help with
 

Sevion

The DIY Ninja
Reaction score
413
Why don't you just do:

Code:
For (Integer A) from 1 to 12 do (Multiple Actions):
    <Hide Multiboard for Player (Integer A)>
Set PLAYERVAR = Player Whatever
Custom Script:    if GetLocalPlayer() == udg_PLAYERVAR then
<Display Multiboard>
Custom Script:    endif

Hand written, you can figure it out though, I bet.
 

Terrabull

Veteran Member (Done that)
Reaction score
38
And it does run, it just crashed the game...
Yes, and as people stated previously in the thread an action can't take any arguments.
You are doing it wrong anyways. If you want it to be something you call from GUI put it in the text area you get when you click on the map name.
Then call it with "Custom Script", that way you can pass a variable to it without crashing Warcraft.
Right now you are trying to do two different things, and that combination will crash the game every time.
 

LordXavier

TH.net Regular
Reaction score
16
I don't even know what you all are talking about when you say "arguments". I just know it deals with Jass

@ Jesus4Lyf, it doesn't show up
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top