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.

AppGameKit Classic Chat / BUG : 2.0.16 Array .length property does not compile with inc/dec commands

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2016 02:49

Sign up for NaGaCreMo!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Jan 2016 05:15
It's probably a private variable you don't have access to change

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2016 05:55
yes i can change it all i want. it says so in the doco. i just can't change it using INC or DEC. it wont compile

Sign up for NaGaCreMo!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jan 2016 15:31
INC and DEC are for changing integer and float data types.
.length is not an integer or float, it is a property of the array. The property just happens to accept an integer value to set it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2016 22:44
My RSI just shed a tear

Sign up for NaGaCreMo!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Jan 2016 04:00
I misunderstood. I was thinking array.length returned the length of AppGameKit arrays (which would've been cool)

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Jan 2016 05:19 Edited at: 17th Jan 2016 05:21
it does, and you can used it to truncate/expand arrays. it's just that you cant use the INC/DEC commands with it.
So instead i'll have to code "myarray.length = myarray.length + 1" which works
http://www.appgamekit.com/documentation/guides/12_array_changes.htm

Sign up for NaGaCreMo!

Login to post a reply

Server time is: 2024-11-17 02:51:41
Your offset time is: 2024-11-17 02:51:41