• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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?????
 
Level 4
Joined
May 31, 2008
Messages
91
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!!
 
Level 4
Joined
Nov 23, 2007
Messages
113
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.
 
Level 4
Joined
May 31, 2008
Messages
91
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)
 
Level 4
Joined
Nov 23, 2007
Messages
113
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.
 
Level 4
Joined
May 31, 2008
Messages
91
the error is something about Worker atachments i dunno exually... somthing with "Worker Asignement" invalid arguments.. realy strange :S (whats invalid arguments?)
 
Level 4
Joined
Nov 23, 2007
Messages
113
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).
 
Level 4
Joined
May 31, 2008
Messages
91
well that the problem , i dunno what the worker assignment is :S is it something with constructing structures?
 
Level 4
Joined
Nov 23, 2007
Messages
113
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?
 
Level 4
Joined
Nov 23, 2007
Messages
113
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.
 
Level 4
Joined
May 31, 2008
Messages
91
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
 
Level 4
Joined
May 31, 2008
Messages
91
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
 
Level 4
Joined
Nov 23, 2007
Messages
113
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.
 
Level 4
Joined
Nov 23, 2007
Messages
113
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.
 
Level 4
Joined
Nov 23, 2007
Messages
113
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).
 
Level 4
Joined
Nov 23, 2007
Messages
113
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.
 
Level 4
Joined
May 31, 2008
Messages
91
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.
Top