The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Varskill
Author Message
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Varskill
I would make the following suggestions:

- don't use OBJ (OBJ is a global reference and some other script could clobber your reference or you could clobber theirs), use a REFn instead

- when you are checking a TAG in an IF statement, use IF (<TAG0.whatever>) instead of IF (0<TAG.Whatever>)

- instead of using ARGN to get passed-in arguments, use ARGV to see how many there are and ARGV[0] to get the first one and ARGV[1] to get the second one etc...

- I would avoid creating tags that are just numeric... (in your example you are using TAG.<eval <ARGN>> and stuff like that... if gets confusing. Instead use TAG.Skill_<dARGN>

- Since you don't use the LOCAL.tagcount inside the loops, this:

Code:
ON=@Equip
local.tagcount = <tagcount> -1
IF <dLOCAL.tagcount> >= 0
FOR 0 <local.tagcount>
...do stuff
ENDFOR
ENDIF

could be simplified to:

Code:
ON=@Equip
FOR 0 <eval <tagcount> -1>
...do stuff
ENDFOR

I think it would also greatly simplify the @unequip trigger to do that... At a glance I don't understand whats going on though.
02-28-2013 10:01 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Varskill - Crusader - 02-28-2013, 05:24 AM
RE: Varskill - RanXerox - 02-28-2013 10:01 AM
RE: Varskill - Crusader - 02-28-2013, 06:14 PM
RE: Varskill - RanXerox - 03-01-2013, 01:44 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)