• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Importing jass question.

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
I've recently been given jass scripts from an old map, that I'm trying to use in a new map of the same type of game. They are all .j files. I've tried to create separate triggers for each spell, ability, unit etc. But it is erroring. Am I supposed to import these jass files via the import manager? Or do I just have some error in the code itself?



I have all the files in triggers already.

When I compile the first issue I get is this.

Gyazo - e0811e1384562ceb9ff0a9ee6b1566f0.png

Unable to find Hidden Natives, I've got another trigger that I entitled "Hidden Natives"

Which contains

Code:
// hidden natives from common.ai
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native GetUnitBuildTime takes integer unitid returns integer
//constant native GetFoodMade takes integer unitId returns integer
//constant native GetFoodUsed takes integer unitId returns integer
//constant native GetUnitFoodMade takes unit whichUnit returns integer
//constant native GetUnitFoodUsed takes unit whichUnit returns integer

If anyone could point me in the right direction that would be great, I'd love to make use of all these spells and everything else would save me a ton of time than redoing everything manually.

The whole folder I've been given looks like this.

Gyazo - 404029de4f2ba8ea34e42852644d91c1.png

I don't have jasscraft though, I have Sharp Craft world editor. Would that matter, would it not recognize certain syntax used in these files?
 
Last edited:
Level 12
Joined
Dec 2, 2016
Messages
733
Sorry, mobile.Try the map to be in the same folder as the .j /move it there, so the //!import command has a valid source.


Thanks, I've now got this issue happening.

In my import script, It's importing a script entitled utilsTriggers.j

When I run the map, it error's on this bit of code.

Code:
function DisableListedTriggers takes nothing returns nothing
  local integer i
  for i = 0 to NumTriggers
    call DisableTrigger (Triggers[i])
  endfor
endfunction

It says it doesn't recognize the 'i' variable, yet it's declared above the for loop. Any idea what the issue is?
 
Status
Not open for further replies.
Top