you have some mistake or something,i got error when i try to run it
Custom script: call DebugError (GetOwningPlayer(GetTriggerUnit()), "|c00FFFF00Already at full health.|r")
wrf my editor sucks,i got error again and i usedSorry; works at JassNewGen Pack, it didn't work at normal World Editor.
Custom script: call DebugMsg (GetOwningPlayer(GetTriggerUnit()), "Nope, can't cast this.")
why...Is your editor JNGP?
not in editor just hereWell, apparently, this is a function that is only supported by JNGP, at least this function should be first written within JNGP and it will work for other editors, once you save it.
Now, the first should work, the "A" is a variable i guess of type "Unit" and "Set A = (Hero Manipulating Item or Triggering unit)". The second one, i don't know if you did write this now, but it should also have "GetOwningPlayer()", forgot that here or in the Editor? ;p
Omg...i know how to do a game text -.- ,Can`t be simply this:I don`t think you can call wc3 messages.
Game - Display to (Player group((Owner of (Triggering unit)))) the text: Error
function BJDebugMsg takes string msg returns nothing
local integer i = 0
loop
call DisplayTimedTextToPlayer(Player(i),0,0,60,msg)
set i = i + 1
exitwhen i == bj_MAX_PLAYERS
endloop
endfunction
call BJDebugMsg ("Hello")
DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 1, 0, "Error")
works great,i just need to put "call " if i want to use it in GUIBJDebugMsg takes only the string parameter...
Try:DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 1, 0, "Error")
Fiddle with the numbers (x, y) to set it to the right position... Also play the sound yourself.
the only good thing is that i do not have to make player groups and destroy it like hwn i use normal game textBJDebugMsg takes only the string parameter...
Try:DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 1, 0, "Error")
Fiddle with the numbers (x, y) to set it to the right position... Also play the sound yourself.
Found a solution: SimError by Vexorian
Player Groups don't leak?
does it clear all the text massages and types the error massage after it?Use SimError! It's the only possible solution!
Yes it does, but it's your only possible solution!
call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, msg )
globals
private sound error
endglobals
//============================================
call ClearTextMessages()
call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00 BLA |r" )
call StartSound( error )
Yes, and that's what SimError does.
But it puts it in the right place.JASS:call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, msg )
Just try doing
JASS:globals private sound error endglobals //============================================ call ClearTextMessages() call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00 BLA |r" ) call StartSound( error )