(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
05-14-24 01:16 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - VB and some math help New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
interdpth

Mole
MZM rapist


 





Since: 11-18-05

Last post: 6294 days
Last view: 6294 days
Posted on 01-26-06 09:26 PM Link | Quote
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



wboy









Since: 01-05-06

Last post: 6477 days
Last view: 6477 days
Posted on 01-27-06 06:50 AM Link | Quote
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...
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6295 days
Last view: 6294 days
Posted on 01-27-06 07:48 PM Link | Quote
I would like to help you but your grammar is so atrocious that I have no idea what you're trying to ask.
Add to favorites | Next newer thread | Next older thread
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.008 seconds; used 357.10 kB (max 419.27 kB)