(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-07-24 09:10 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - VB and some math help
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
||bass
Posts: 104/594
I would like to help you but your grammar is so atrocious that I have no idea what you're trying to ask.
wboy
Posts: 5/15
Few Q's...

Samp( ) is your array of integers yeah?

If so, you techinally can't get the (hex?) result 409A by calling the Str function... as it'll string the integer value and not show the eqivalent hex values like when you use Hex(Samp(36))?

your pal value is the left most digit? are you * 1000'ing to get the hex representation of 4000?

also, your pal mid statement is grabbing the first 2 chars, making it 40 * 1000 = 40000. Do you mean mid(buf,1,1) or alternatively left(buf,1).... and right*(buf,3) for tile?

finally, what variable types do you want the pal and tile values returned as... strings representing 4 and 09A or their integer equivalents...
interdpth
Posts: 31/362
Ok well i'm working on a map editor and stuff in VB, my tile TSA is stored in integers
Here's an example 1034 or 409A
The palette would be 1 in the other place 4 and the rest is the is the tile so TSA - Pal = tile

Now what I would like to know is how I can get the Pal value you correctly then the tile right now my code is lame and i'm using strings anyone mind helping? Thanks

And here is my code

buf = Str(Samp(36))' Where all TSA data is stored
pal = Mid(buf, 1, 2)'Gets the value in the place
MsgBox pal'SHows whatn umber
pal = pal * 1000
MsgBox pal'Shows the full one
tile = Mid(buf, 2, 3)
MsgBox tile



Acmlm's Board - I3 Archive - Programming - VB and some math help


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.010 seconds; used 348.30 kB (max 379.73 kB)