Clan TMMM
Would you like to react to this message? Create an account in a few clicks or log in to continue.


The official site of Clan TMMM
 
HomeHomeSearchLatest imagesRegisterLog in


Latest topics
» Kevkevqaz is back
What is wrong with this JASS? I_icon_minitimeby Eat_bacon_daily Wed Feb 22, 2023 7:22 pm

» Hey whats up
What is wrong with this JASS? I_icon_minitimeby seankly Tue Feb 04, 2020 10:32 pm

» Gotta click fast - WC3 Mazing #mildlyinteresting
What is wrong with this JASS? I_icon_minitimeby hoffmann Wed Jun 21, 2017 10:28 pm

» I'm getting married and you guys are invited
What is wrong with this JASS? I_icon_minitimeby Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
What is wrong with this JASS? I_icon_minitimeby Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
What is wrong with this JASS? I_icon_minitimeby Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
What is wrong with this JASS? I_icon_minitimeby Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
What is wrong with this JASS? I_vote_lcap26%What is wrong with this JASS? I_vote_rcap
 26% [ 8 ]
Warcraft 3
What is wrong with this JASS? I_vote_lcap35%What is wrong with this JASS? I_vote_rcap
 35% [ 11 ]
League of Legends
What is wrong with this JASS? I_vote_lcap19%What is wrong with this JASS? I_vote_rcap
 19% [ 6 ]
World of Warcraft
What is wrong with this JASS? I_vote_lcap0%What is wrong with this JASS? I_vote_rcap
 0% [ 0 ]
Diablo 2
What is wrong with this JASS? I_vote_lcap0%What is wrong with this JASS? I_vote_rcap
 0% [ 0 ]
No games at all
What is wrong with this JASS? I_vote_lcap10%What is wrong with this JASS? I_vote_rcap
 10% [ 3 ]
Other game not listed
What is wrong with this JASS? I_vote_lcap10%What is wrong with this JASS? I_vote_rcap
 10% [ 3 ]
Total Votes : 31
Transparency

 

 What is wrong with this JASS?

Go down 
2 posters
AuthorMessage
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



What is wrong with this JASS? Empty
PostSubject: What is wrong with this JASS?   What is wrong with this JASS? I_icon_minitimeMon Aug 01, 2011 1:30 am

I can't figure out what is wrong with this jass trigger... Ill post the complete trigger, including the generated stuff and the error list. If I could narrow it down to a particular thing I would.

Trigger:
Code:
//***************************************************************************
//*
//*  Global Variables
//*
//***************************************************************************

globals
    // User-defined
    string                  udg_LastEnteredChatString
    integer array          udg_CurrentTerrainShape
    integer array          udg_CurrentTerrainSize
    unit array              udg_Spawner

    // Generated
    trigger                gg_trg_Terrain_Type        = null
    trigger                gg_trg_UnitSpawner        = null
endglobals

function InitGlobals takes nothing returns nothing
    local integer i = 0
    set udg_LastEnteredChatString = ""
    set i = 0
    loop
        exitwhen (i > 12)
        set udg_CurrentTerrainSize[i] = 1
        set i = i + 1
    endloop

endfunction

function Trig_UnitSpawner_Custom_Parser takes string s returns nothing
   
endfunction

function Trig_UnitSpawner_Normal_Parser takes string s returns nothing
   if(s == "hpea") then
      call CreateUnit('hpea')
      return
   endif
   if(s =="hfoo") then
      call CreateUnit('hfoo')
      return
   endif
   if(s == "hkni") then
      call CreateUnit('hkni')
      return
   endif
   if(s == "hrif") then
      call CreateUnit('hrif')
      return
   endif
   if(s == "hmtm") then
      call CreateUnit('hmtm')
      return
   endif
   if(s == "hgyr") then
      call CreateUnit('hgyr')
      return
   endif
   if(s == "hgry") then
      call CreateUnit('hgry')
      return
   endif
   if(s == "hmpr") then
      call CreateUnit('hmpr')
      return
   endif
   if(s == "hsor") then
      call CreateUnit('hsor')
      return
   endif
   if(s == "hmtt") then
      call CreateUnit('hmtt')
      return
   endif
   return
endfunction

function CreateUnit takes integer i returns nothing
   CreateUnitAtLoc(1, i, GetEventPlayer(GetTriggerPlayer(), GetUnitLoc(udg_UnitGrp1[GetConvertedPlayerId(GetTriggerPlayer())]), 180.00 )
   return
endfunction

function Trig_UnitSpawner_Actions takes nothing returns nothing
   if(SubString(GetEventPlayerChatString(), 6, 11) == "Normal") then
      call Trig_UnitSpawner_Normal_Parser(SubString(GetEventPlayerChatString(), 13, 16))
      return
   endif
   if(SubString(GetEventPlayerChatString(), 6, 11) == "Custom") then
      call Trig_UnitSpawner_Custom_Parser(SubString(GetEventPlayerChatString(), 13, 16))
      return
   endif
   return
endfunction

function InitTrig_UnitSpawner takes nothing returns nothing
   set gg_trg_UnitSpawner = CreateTrigger()
   call TriggerRegisterPlayerChatEvent(gg_trg_UnitSpawner, Player(0), "-SpawnNormal", false)
   call TriggerAddAction(gg_trg_UnitSpawner, function Trig_UnitSpawner_Actions)
endfunction

Error:
Code:
Line 38: Invalid number of arguments
Line 42: Invalid number of arguments
Line 46: Invalid number of arguments
Line 50: Invalid number of arguments
Line 54: Invalid number of arguments
Line 58: Invalid number of arguments
Line 62: Invalid number of arguments
Line 66: Invalid number of arguments
Line 70: Invalid number of arguments
Line 74: Invalid number of arguments
Line 79: Expected a name
Line 80: Expected a name
Line 81: Expected 'endif'
Line 83: Expected 'endif'
Line 93: Expected 'endif'
Line 95: Expected 'endif'
Line 99: Expected a function name
Line 99: Expected 'endif'

The name of the trigger is UnitSpawner


-Oreo
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



What is wrong with this JASS? Empty
PostSubject: Re: What is wrong with this JASS?   What is wrong with this JASS? I_icon_minitimeMon Aug 01, 2011 2:03 am

All your return statements that return nothing should be "return null"
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



What is wrong with this JASS? Empty
PostSubject: Re: What is wrong with this JASS?   What is wrong with this JASS? I_icon_minitimeMon Aug 01, 2011 10:27 am

This still has to do with the trigger, but I think my WE just broke. I'm clicking the enabled checkbox and nothing is happening. It's changing if it has a check in it but the trigger is not enabling. I just restarted the WE and it is still doing that.

EDIT:

That seems to be the only trigger that WON'T enable. It doesn't even show errors when I click enable trigger, it just does nothing...

EDIT 2: I got rid of all the nulls after the Return statements and it shows me errors again...

EDIT 3: I re-added nulls after the returns and now it shows me errors but they're the SAME errors I had before.
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



What is wrong with this JASS? Empty
PostSubject: Re: What is wrong with this JASS?   What is wrong with this JASS? I_icon_minitimeMon Aug 01, 2011 10:52 am

My line numbering might be wrong

But I copied and pasted your code into notepad++ to get the right line numbers so they should be right
All the lines it refers to in the errors are the return statements (the first 10)

If thats not the case then im not sure whats wrong with them
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



What is wrong with this JASS? Empty
PostSubject: Re: What is wrong with this JASS?   What is wrong with this JASS? I_icon_minitimeMon Aug 01, 2011 11:44 am

It's not working so I'll just scrap what I have and start from scratch again

Thanks for answering tho.
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



What is wrong with this JASS? Empty
PostSubject: Re: What is wrong with this JASS?   What is wrong with this JASS? I_icon_minitimeMon Aug 01, 2011 2:42 pm

Laughing I'm A Retard...
Code:
function CreateUnit
is a native function... I accidentally named my function that Laughing
Back to top Go down
Sponsored content





What is wrong with this JASS? Empty
PostSubject: Re: What is wrong with this JASS?   What is wrong with this JASS? I_icon_minitime

Back to top Go down
 
What is wrong with this JASS?
Back to top 
Page 1 of 1
 Similar topics
-
» Need Jass Help
» JASS HELP PLZ!
» Jass Help
» Hmm Jass...
» Jass broke my wc3...

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: