Login
Register
Menu
Home
Forum
JassDoc
Types
Functions
Variables
Help
Chat
Media
Search
Search posts
WC3 JASS.com
"The Jass Vault" plus vJASS and Zinc
WC3 Modding Information Center
Forum
Warcraft (WC3) Modding
Triggers & Scripting
WC3JASS.com
Jassdoc
[types] integer
Warcraft III:
Maps
Models
Skins
Icons
Spells / Systems
Tools
Tutorials
Snippets
JASS vJASS Spells and Systems
Tutorials
Chat @Discord
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation
-
Zinc documentation
-
WC3 Optimizer documentation
This topic is the discussión abut the type
integer
. You can see all the information about this type keyword
HERE
.
[types] integer
Jassdoc
Started by
moyack
Views
793
Replies
1
Users
2
1
1
Pages:
1
Go Down
0 Members and 1 Guest are viewing this topic.
moyack
Site Owner
Administrator
Posts:
971
WC3 Models: 20
WC3 Tutorials: 17
WC3 Tools: 19
WC3 Maps: 12
WC3 Skins: 0
WC3 Icons: 1
WC3 Spells: 16
Reputation:
1153
Site Admin - I love fix things
[types] integer
on:
August 10, 2020, 12:17:46 AM
JASS integer values take 32 bits.
Representations
Decimal
.- Any number, negative , positive or 0 that does not have a fractionary part: ex: 12 , -199930 , 999999
Octal.
- If a number starts with 0 it is considered an octal value, ex: 07 == 7 , 08 causes a syntax error, 012 equals to 10.
Hexadecimal.
- If a number starts with 0x it is considered a hex value, ex: 0x2==2, 0xA == 10 , 0x10 == 16 , 0xFF == 255 .
Character.
- An asc ii character between
''
represents its correspondant number from 0 to 255, ex: 'A'==65 , '<'==60 . Note that certains bytes inside the script file will cause major errors.
4 Characters.
- A representation in ASCII of the 4 bytes used by the integer, this representation is mostly used for Unit/ability/tile /upgrade/etc/ ids. Example:
'Aloc'
,
'B000'
WC3 Modding Information Center
City17
Starter - level 2
Posts:
450
WC3 Models: 0
WC3 Tutorials: 0
WC3 Tools: 0
WC3 Maps: 0
WC3 Skins: 0
WC3 Icons: 0
WC3 Spells: 0
Reputation:
0
User
Re: [types] integer
Reply #1 on:
February 22, 2022, 09:28:28 AM
Lua is also compiled with 32-bit integers (game's exe is 64-bit)
Octal: Jass2Lua transpiler does not support integers defined in octal representation and crashes. (Reforged, v1.32.10)
Character:
'hfoo'
represents a
h
uman
foo
tman object code in Jass. These are also called "raw codes" or
FourCC
. In Jass, these are automatically read as integers by the Jass interpreter.
If you use Lua, you must manually convert a string of four characters to integer with
FourCC("hfoo")
. This is true for ability IDs, unit/destructable types etc. in any place where the game's API needs an integer to refer to the type of an object.
«
Last Edit: February 23, 2022, 01:26:45 PM by City17
»
Print
Pages:
1
Go Up
« previous
next »
WC3 Modding Information Center
Forum
Warcraft (WC3) Modding
Triggers & Scripting
WC3JASS.com
Jassdoc
[types] integer
Suggested Topics
Jassdoc introduction
Started by
moyack
Replies: 3
Views: 4233
Jassdoc
[types] boolean
Started by
moyack
Replies: 0
Views: 745
Jassdoc
[types] real
Started by
moyack
Replies: 0
Views: 683
Jassdoc
[types] string
Started by
moyack
Replies: 0
Views: 724
Jassdoc
PortaMx-SEF 1.54
|
PortaMx © 2008-2015
,
PortaMx corp.
Search
Username
Password
Always stay logged in
Forgot your password?