substring question

doin

New Member
Reaction score
1
Hi,
yet another question.
I've got some code, tested it on a blanc map and there it worked.
then I tried it on a map with a few of my tests and guess what... it soesn't work anymore, the problem is, it's probably just a stupid mistake.
here's the code. It's supposed to create a footman when you type "-unit".
JASS:
function Trig_sstest_Actions takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, 'hfoo', Player(0), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
endfunction

//===========================================================================
function InitTrig_sstest takes nothing returns nothing
    set gg_trg_sstest = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_sstest, Player(0), "-unit", false )
    call TriggerAddAction( gg_trg_sstest, function Trig_sstest_Actions )
endfunction
 
Z

ZyrX

Guest
Did you put it in a trigger named "sstest" (Without the "") ?

There's no error in the code itself.
 

doin

New Member
Reaction score
1
yes, it is in the appropriate trigger, and it still doesn't work, but what's worse, a trigger I made(and had some problems with) doesn't work anymore, except if I import the code in a new and clean map. So I'm starting to think that this is about Newgen, instead of me.
 
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