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-nmm6 (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-nmm6 (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-nmm6 (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
Tag and Defnames
Author Message
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #1
Tag and Defnames
I'll use an example for explaining better
PHP Code:
[DEFNAME tal]
1tal    1
2tal    100
3tal   10000000000000000000000000000000 
//32  max lenght ?
4tal    1000000000000000000000000000000

[FUNCTION tals]
tag0.tal |= <def.1tal> | <def.2tal> | <def0.3tal> | <def0.4tal>
if <
tag0.tal>&<def.1tal>
    
say  01 ok
endif
if <
tag0.tal>&<def.2tal>
    
say  02 ok
endif
if <
tag0.tal>&<def.3tal>
    
say  03 ok
endif
if <
tag0.tal>&<def.4tak>
    
say 04 ok
endif
return 

That function above works fine , but i have noticed that some defname values that works as "flags" start always with 0.

So i added 0 to the defnames values above and only the two first IF fires correctly,then i noticed that the tag starting with 0 (an hex number) can contain only 8 "numbers" + 0 .

Anyone knows an explanation Shock ?
(This post was last modified: 05-31-2012 05:02 AM by darksun84.)
05-31-2012 05:00 AM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #2
RE: Tag and Defnames
I donĀ“t know if this is crop with 8 numbers but I know if you use hex numbers for flags it is limited (maybe it was 8 numbers).
had the same problem for my spell system.
05-31-2012 05:05 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #3
RE: Tag and Defnames
So i assume i can just avoid to put 0 in front of defnames Big Grin or it can be dangerous in some way?
05-31-2012 05:23 AM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #4
RE: Tag and Defnames
I always put an 0 before it but you will be also limited after x numbers.
05-31-2012 06:00 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Tag and Defnames
yes, i found that the max is 32
05-31-2012 06:58 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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