• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] what the hell??

Status
Not open for further replies.
Level 4
Joined
May 31, 2008
Messages
91
i get this error please help!!


//===========================================================================
function main takes nothing returns nothing
call InitAI( )
call SetPlayerName( ai_player, "ultra ai" )
call InitOptions( )
call SelectHeroes( )
call CreateCaptains( )
call SetHeroLevels( function ChooseHeroSkill )

call Sleep( 0,1 )
call StartThread( function WorkerAssignment )


WTH they mean with that?????
 
well , i edited an ai it becomes verry strong , but when i imported music like a boss music from a game then i had the error evrytime even if i delted the music... realy strange and what they mean with Wroker asignement? the ai build like 5 ancient of war and 5 lore and 5wind a bunch of protectors but that dusnt mean it has to be an error right?

anyway if u people got an verry stron custom ai for me feel free to send me please , i need one for my map , an ai that build lotta units (withotu food , gold and lumber) so they are like unbeatable... thanks if u do!!
 
What you posted is the main function of an AI file. What error are you getting and where is this error being displayed (pjass)? Is this something you have created from scratch or is this from the AI editor? I don't understand what you mean by you get this as an error when what you posted is JASS AI code.

WorkerAssignment is the thread that is started to run your entire build process, including workers. It provides the AI with harvest priorities and build orders.

SetHeroLevels( function ChooseHeroSkill ) sets the ChooseHeroSkill() function to be called when the hero levels up so it can use spells

Note that you are missing your endfunction statement.
 
i had an ai edtior used , i had the following structs/units in list

-tree of life
-wisp (x5)
- ancient of war (x5) (hmmm... all structs x5)
- then a mass units (archersss , huntressesss. dryadssss and more!!) and no its a NO gold/lumber map so i disable gold harvesting (units are free)
 
I still don't know what error you are encountering (or where you are getting the error from). What's the exact error message? Or does your AI just do nothing when you run it?

If you disabled harvesting, ensure you haven't disabled the build loop or nothing will get built.
 
the error is something about Worker atachments i dunno exually... somthing with "Worker Asignement" invalid arguments.. realy strange :S (whats invalid arguments?)
 
What program is giving you this error? pjass?

What it is likely telling you is that since you disabled (commented out?) the worker assignment function, the parameter you've passed to StartThread is no longer defined (bad argument).
 
well that the problem , i dunno what the worker assignment is :S is it something with constructing structures?
 
I explained that above... it tells the workers what to do (that includes harvesting and building structures).

Can you answer the question above? Did you open the ai file and edit it by hand? How did you "disable" the worker assignment?
 
If you deleted the harvest priorities in the AI editor, the WorkerAssignment function is still generated. Without knowing the exact error message, or having access to the AI file, it's hard to say what is wrong.
 
well i have remade an ai now... it was deleted becuase that ai completly was out of control or else i wanted to show u the ai
 
how can i attach an Wai file? its invalid for this website

and the problem is not solved , it cna always happen again , last time it happened by importing a music :S
 
try zipping the wai file up using winzip or winrar or the default zip util that comes with Windows. Perhaps this site permits zip files.
 
If it only happened after you imported something else, then the error is likely due to something else you imported and propagated down through the code. However, if you want to post the ai file I can check it to determine if there is nothing wrong with it.
 
Well, there is nothing syntactically wrong with the ai file. Of course, I can't test it since I don't have a map designed where everything is free (it simply stops building after the first archer because it doesn't have the lumber to create the Tree Of Ages).
 
Well, other than it stops building after the 2nd archer because you request a POTM when you haven't yet built an alter, I don't see anything seriously wrong with it (it compiles fine and is syntactically correct).

As an aside... If you have any programming ability, you might consider dumping the AI editor and writing the code by hand (and using pjass to check your syntax) as this will provide you with much more control over your AI.
 
well its kinda hard to get the jass code out of ur head... oh yeh that altar thingy was lrdy fixed , but thats not the error i mean
 
Status
Not open for further replies.
Back
Top