Author Topic: Auto-determinig Lua version in PtokaX  (Read 2400 times)

0 Members and 1 Guest are viewing this topic.

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 730
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Auto-determinig Lua version in PtokaX
« on: 16 August, 2006, 20:46:02 »
Include this in the beginning of your script if it's 5.1:

Code: Lua
  1. assert(package~=nil,"***ERROR: Your PtokaX is compiled with Lua 5.0.2 and this script needs 5.1!")

 ;D ;D ;D

For 5.0.2, replace ~= with ==
Everything could have been anything else and it would have just as much meaning.

PtokaX forum

Auto-determinig Lua version in PtokaX
« on: 16 August, 2006, 20:46:02 »