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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top