Jass Questions.

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass Questions.

Post by HINDYhat »

Lol... this may sound noob, but to find it could you do:

Code: Select all

function H2I takes handle h returns integer
    return h
    return 0
endfunction

function GetIntegerShit takes unittype ut returns nothing
    call DisplayTextToPlayer(Player(0),0,0,I2S(H2I(ut)))
endfunction
Is that how you got it? Or is there another way.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Jass Questions.

Post by Aero »

Haha, you're trying too hard.

function CreateUnit takes player id, integer unit id, real x, real y, real face returns nothing
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Jass Questions.

Post by weirdone2 »

Thx hindy that does look like it would work. :D

And aero you do realize i'm asking how to get the interger form not how to use it rite? o.0
HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass Questions.

Post by HINDYhat »

WHAT?!?! Aren't integer unitid's just the unittype surrounded by single quotes?? I can't understand how 12839018323 would end up as 'hpea' or whatever.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Jass Questions.

Post by Aero »

It's like save/load codes, how does FG5S end up as 1.6 million?

'xxxx' is not a unittype or a handle. It's an integer in compressed form and only that.

Ever see 'd' in .j scripts? 'd' = 100. 'h000' is similar to 'd' but goes through a formula (which is secret =p)
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Jass Questions.

Post by weirdone2 »

I see you don't wanna tell us eh guess i'll ask some1 else then. :P
HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass Questions.

Post by HINDYhat »

Oh, so it's just base conversion? Like ASCII shit?
HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass Questions.

Post by HINDYhat »

Yup I just got it. Searched for an ASCII text converter. I only could convert it to hex though. h000 gives 683030 in hex, which gives 1747988528 in decimal.
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Jass Questions.

Post by weirdone2 »

O damn lolz I always seem to take the harder way lolz I was manually starting to convert that shit. :( And I was way off to lolz.

Anyway to those who dont understand heres a break down. Take the letters of the unitype example H000 convert them to hex if you dont no ascii to hex then heres a lil chart down below. So after we convert them we get h=68, 0=30, 0=30, 0=,30. Then just use your everyday calculator to convert to decimal. :) And partial credit to aero for letting us know about it. :P
asciichart.JPG
You do not have the required permissions to view the files attached to this post.
HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass Questions.

Post by HINDYhat »

But, what's the advantage of using decimal based ID's... can't you just use the ID in single quotes ( ' ), and that will convert it by itself, right?