• 🏆 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!

Cant run copied trigger

Status
Not open for further replies.
Level 7
Joined
Dec 28, 2009
Messages
257
Olahey, ive got some strange problem: I want to implement this
http://www.hiveworkshop.com/forums/...irs-v1-0f-232064/?prev=search=irs&d=list&r=20
into my map. I did some tweaks, added my own items and so on, but when i run my map it just gives me the error.
The thing is, in original map it works all fine, but when i copy it, suddenly theres some mistake.

This is main error:
10335621_10202764195478281_883704616_o.jpg



Also, the error pops in one other trigger, but its all the same: "EXPECTED A FUNCTION NAME". I dont get it.

Ive got 0 skill in JASS and im not IT/Math guy so ive got no intentions in learning it whatsoever, thats why i need help :/

Also, ive asked this quite some time ago, but i was inactive and didnt respond to previous topic, sorry :(

thanks if you can help..

*bump?
 
Last edited:
Level 7
Joined
Dec 28, 2009
Messages
257
I hope bumping isnt forbidden.
Because this error also occurs when i try copying some other spells/mechanics (when i downloaded some Knockback spell it also showed similar errors) and its quite pain in the **** :/
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,222
I hope bumping isnt forbidden.
It is not but only if over 48 hours have past since the last post.

The error is being produced because you are calling a non-existant function. Specifically you are trying to call "IRS_RegisterRestrictedItem" when there is no such function declared with that name above the point you are calling it from.

Looking at the demo map you have not copied across the required code or are trying to access it from above where it is declared. JASS can only link to functions above the call point so if you were to place the library code below the call point (as it looks like it is coming from a trigger) then it will fail to compile as it cannot find the referenced function names.

In vJASS one normally uses library scopes to make sure that code is placed near the top of the script above all trigger declerations however it appears that this particular system does not do this as it looks like it could even be a normal JASS system.

Import procedure.
1. Import header script.
2. Import initialization trigger for the system. Put this as high up the trigger folder structure as possible (close to the top of the list as possible).
3. Call the provided functions. This can only be done with triggers physically below the system initialization trigger in the list (as closer to the bottom of the folder structure list).
 
Level 7
Joined
Dec 28, 2009
Messages
257
Ooooh thanks, i finally got it :D ive realized it probably doesnt recognize those commands, but i never realized theres anything like the "map header" thing (checked some other tutorial and luckily ive found sth)

Thanks a lot!
 
Status
Not open for further replies.
Top