Problem with my error message

8uY_YoU

New Member
Reaction score
4
JASS:
function EM takes string msg, player a returns nothing
if a == GetLocalPlayer() then
call ClearTextMessages()
call PlaySound("Sound\\Sounds\\Internal\\Sound\\Interface\\Error.wav")
call DisplayTimedTextToPlayer(a,100.,100.,3.,msg)
endif
endfunction

When i called above function only cleartextmessage is working
Trigger:
  • Call
    • Events
    • Unit is attacked
    • Conditions
    • Unit is ally
    • Actions
    • Custom Script: call EM("You cant do that!",GetOwningPlayer(GetAttacker))
 

Azlier

Old World Ghost
Reaction score
461
>//Use BJ..
That's a nice way to cause a desync.

>string msg player a
No comma?
 

Azlier

Old World Ghost
Reaction score
461
>string msg player a
Still no comma?

>//Use BJ..
Will desync if you destroy bj_lastPlayedSound (or whatever it's called).
 

8uY_YoU

New Member
Reaction score
4
JASS:

function EM takes string msg player a returns nothing
if a == GetLocalPlayer() then
call ClearTextMessages()
call PlaySoundBJ("Sound\\Sounds\\Internal\\Sound\\Interface\\Error.wav")//Use BJ..
endif
call DisplayTimedTextToPlayer(a,100.,100.,3.,msg)//Since the text is going to display to the player, no need to put in the block.
endfunction


I have been used it for ages and no problem occurs.

Ok..
But when compiled, its error because SoundBJ needs object firstly at sound editor like gg_snd_Error same as you use Play Sound action on GUI
Oh you forgot comma also
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top