Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-30-2011, 11:54 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Weird scripting bug

So is there any reason this is not working properly?

PHP Code:
0x7FF 512 
Output
PHP Code:

It should be 8 ????
Reply With Quote
  #2  
Old 08-30-2011, 11:58 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by scriptless View Post
So is there any reason this is not working properly?

PHP Code:
0x7FF 512 
Output
PHP Code:

It should be 8 ????
actually it's more like 3.9 something and I guess GScript is truncating it into an int rather than rounding (int cast) so it is becoming 3.

EDIT:

GScript isn't truncating it so it must be you.

echo(0x7FF / 512);

output

3.998046875
Reply With Quote
  #3  
Old 09-01-2011, 03:36 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Weird, 0x7FF = 4096.. Hex to Dec.. and 512 is DEC.. might graal be converting a dec to hex then calculating? Because I wasn't sure of any commands to convert hex/dec values. =/

Notice the lack of "0x" on 512.. o.O
Reply With Quote
  #4  
Old 09-01-2011, 04:05 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by scriptless View Post
Weird, 0x7FF = 4096..
0x7FF = 2047.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #5  
Old 09-01-2011, 04:38 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Tolnaftate2004 View Post
0x7FF = 2047.
Right, but there are 7FF tiles in graal's tileset.. looking at the tiles data ???

As a matter of fact, you have 64 x 64 tiles, and u can use every tile on the tileset in the level no left over.. perfectly.

64 x 64 = 4096... and it goe's in order.. o_o
Reply With Quote
  #6  
Old 09-01-2011, 04:46 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by scriptless View Post
Right, but there are 7FF tiles in graal's tileset.. looking at the tiles data ???

As a matter of fact, you have 64 x 64 tiles, and u can use every tile on the tileset in the level no left over.. perfectly.

64 x 64 = 4096... and it goe's in order.. o_o
Graal tileset ends at 0xFFF, not 0x7FF.
Reply With Quote
  #7  
Old 09-01-2011, 05:03 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by DustyPorViva View Post
Graal tileset ends at 0xFFF, not 0x7FF.
But the bottom right tile is 0x7FF .. im confused.. lol
Reply With Quote
  #8  
Old 09-01-2011, 05:10 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by scriptless View Post
But the bottom right tile is 0x7FF .. im confused.. lol
When I checked the bottom right is 0xFFF. 0x7FF is the mid-way point of the tileset, the grass tile to be specific.
Reply With Quote
  #9  
Old 09-01-2011, 05:21 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Oh, you're right. For some reason it wasn't showing the correct tile in the tile array data in the editor.. =/ *sigh* well that makes things MUCH easier =/
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.