SphereCommunity
Tag and Defnames - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Tag and Defnames (/Thread-Tag-and-Defnames)



Tag and Defnames - darksun84 - 05-31-2012 05:00 AM

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 ?


RE: Tag and Defnames - admin phoenix - 05-31-2012 05:05 AM

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.


RE: Tag and Defnames - darksun84 - 05-31-2012 05:23 AM

So i assume i can just avoid to put 0 in front of defnames Big Grin or it can be dangerous in some way?


RE: Tag and Defnames - admin phoenix - 05-31-2012 06:00 AM

I always put an 0 before it but you will be also limited after x numbers.


RE: Tag and Defnames - darksun84 - 05-31-2012 06:58 AM

yes, i found that the max is 32