JASS question

T

The_ChRiS

Guest
Im making a map using WEU. Im fairly new to JASS but i understand some things... I need help using a WEU only trigger. Otherwise known as:

Code:
function NOBUY takes string s, player p returns nothing
    call DisplayTextToPlayer( Player(0), 0, 0, s )
endfunction

I need help with the player... I have the calling function.

Code:
call NOBUY("You can't buy two of the same spell!")

but i need to put this function in there to represent Player p,

Code:
GetOwningPlayer(GetBuyingUnit())


If you can help me or give me the finished code it would be great.
:banghead:
 

XXXconanXXX

Cocktails anyone?
Reaction score
284
Code:
function NOBUY takes string s returns nothing
    call DisplayTextToPlayer(GetOwningPlayer(GetBuyingUnit()), 0, 0, s )
endfunction

If it takes player p, you've have to set the GetOwningPlayer when you call the function, so this should work. When calling the function, you can do:

Code:
call NOBUY("You can't buy two of the same spell!")

That would work.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top