sc2c.org

Go Back   Sc2C.org > Developer's Corner > Scripting
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 08-10-2010, 09:51 PM   #1
Deaod
Junior Member
 
Join Date: Apr 2010
Location: Germany
Posts: 12
Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default Bugs in Galaxy

Okay, ill start.

This is in no way an authoritative list of all bugs currently known. Rather, its a list of bugs ive come across while exploring galaxy.

So lets get started:

int foo=1.; // compile error, this in itself is not a bug
fixed bar=1./2; // returns 0, instead of the expected 0.5, this is the actual bug
fixed twobar=1/2.; // crashes the thread because of division by 0 (ingame); seems like any number delimited by a dot is interpreted as a 0.
const fixed foobar=1/2.; // crashes the editor, but only for constants; my guess is that the editor cant handle constant divisions by zero.
const int fubar=1/0; // crashes the editor


Then theres a limitation on how many bits can be used directly with hexadecimal notation: You can only use 31 out of 32.

int foo=0x80000000; // compile error, numeric overflow

Im not sure if this is working as intended, but you can use the "!" operator ("not") on integers, which will turn any non-zero value into 0 and zero into 1.

Last edited by Deaod : 10-11-2010 at 11:28 PM.
Deaod is offline   Reply With Quote
Old 08-14-2010, 06:06 AM   #2
Tastingo
Junior Member
 
Join Date: Apr 2010
Posts: 22
Default

With the second one, doesn't the denominator decide what the number is? Like since it's an integer it will come out as an integer. I can't really remember, so just wondering.
Tastingo is offline   Reply With Quote
Old 08-14-2010, 10:57 AM   #3
Deaod
Junior Member
 
Join Date: Apr 2010
Location: Germany
Posts: 12
Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

As far as i remember, it doesnt matter whether the fixed value is in the denominator or not. It doesnt work either way anyway.
But thank you for making me check these things again, i found some interesting things.
Deaod is offline   Reply With Quote
Old 08-14-2010, 11:10 PM   #4
Strategy Master
Ye Old'e AI guy
 
Strategy Master's Avatar
 
Join Date: Jul 2010
Location: Azeroth
Posts: 11
Default

4,5 - constants actually being evaluated within the editor and not handling the errors is slightly annoying.
Strategy Master is offline   Reply With Quote
Old 10-11-2010, 11:28 PM   #5
Deaod
Junior Member
 
Join Date: Apr 2010
Location: Germany
Posts: 12
Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

Updated list.
Deaod is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 01:21 PM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.