Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Array Pop Function  (Read 2401 times)

0 Members and 1 Guest are viewing this topic.

pakhpakh64

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
Array Pop Function
« on: March 12, 2013, 08:48:48 AM »

hi every body!
what does Pop() function returns if the array is empty? null or error?
Logged

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Array Pop Function
« Reply #1 on: March 12, 2013, 10:37:18 AM »

You can check it by youself :)

Code: WME Script
  1. var array = new Array();
  2. Game.Msg(array.Pop());
result - null

Code: WME Script
  1. var array = new Array(1);
  2. Game.Msg(array.Pop());
result - crash of application
Logged

pakhpakh64

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
Re: Array Pop Function
« Reply #2 on: March 12, 2013, 01:26:26 PM »

Thanks a lot.
Logged
 

Page created in 0.059 seconds with 25 queries.