Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / [DBPro U7.5] possible bug in val command

Author
Message
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Sep 2010 19:38
The compiler does not recognise that val() returns an integer. For example the following works:



but the following contraction to one line does not:



Here's sample complete code which works. Just comment/uncomment the relevant lines to see the bug:

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 23rd Sep 2010 01:34
val returns a float. Use IanM's intval() function instead.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Sep 2010 14:27
Quote: "val returns a float"


So it does.

I read the first line of the Help file:

Quote: "This command will return an integer number of the string provided by converting the string to a numerical form."


I didn't notice the line below contradicting that statement.

Quote: "Return Float=VAL(String)"


Yet another Help File error.

I wonder if TGC appreciate how much time is wasted because of errors like that. It creates a bad impression. It must be in their interests to hire someone to sort the files out.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 27th Sep 2010 00:19
Work on the wiki!


Latest progress: Fog of War implemented; frustrated by pathfinding >.>

Login to post a reply

Server time is: 2024-04-18 09:36:02
Your offset time is: 2024-04-18 09:36:02