PtokaX forum

Development Section => LUA & PtokaX-Scripting-Interface => Topic started by: bastya_elvtars on 02 June, 2004, 16:18:23

Title: What is this?
Post by: bastya_elvtars on 02 June, 2004, 16:18:23
Syntax error: attempt to concat local `(null)' (a nil value)
stack traceback:
   1:  function `DoCleanUsers' [(none)]
   2:  function `DataArrival' [(none)]

Syntax error: malformed number;
  last token read: `.4' at line 1 in string "return floor(.4 * 6 + .5)"
stack traceback:
   1:  function `dostring' [C]
   2:  function `SetJumbleHint' at line 423 [file `D:\Server_Client\px\scripts\Jumble.lua']
   3:  function `StartJumblePhrase' at line 325 [file `D:\Server_Client\px\scripts\Jumble.lua']
   4:  function `StartJumbleGame' at line 166 [file `D:\Server_Client\px\scripts\Jumble.lua']
   5:  function `DataArrival' at line 92 [file `D:\Server_Client\px\scripts\Jumble.lua']

Syntax error: attempt to compare nil with number
stack traceback:
   1:  function `SetJumbleHint' at line 427 [file `D:\Server_Client\px\scripts\Jumble.lua']
   2:  function `StartJumblePhrase' at line 325 [file `D:\Server_Client\px\scripts\Jumble.lua']
   3:  function `StartJumbleGame' at line 166 [file `D:\Server_Client\px\scripts\Jumble.lua']
   4:  function `DataArrival' at line 92 [file `D:\Server_Client\px\scripts\Jumble.lua']
Title:
Post by: NotRabidWombat on 02 June, 2004, 16:36:03
What version of PtokaX are you working with? I designed Jumble for TestDrive4 and looks like you're using some newer version of lua that does not like .4 & .5. You may want to try 0.4 and 0.5.

-NotRabidWombat
Title:
Post by: bastya_elvtars on 02 June, 2004, 16:47:00
thx rabid, but there are other errors

Syntax error: malformed number;
  last token read: `0.4' at line 1 in string "return floor(0.4 * 7 + 0.5)"
stack traceback:
   1:  function `dostring' [C]
   2:  function `SetJumbleHint' at line 423 [file `D:\Server_Client\px\scripts\Jumble.lua']
   3:  function `StartJumblePhrase' at line 325 [file `D:\Server_Client\px\scripts\Jumble.lua']
   4:  function `StartJumbleGame' at line 166 [file `D:\Server_Client\px\scripts\Jumble.lua']
   5:  function `DataArrival' at line 92 [file `D:\Server_Client\px\scripts\Jumble.lua']

Syntax error: attempt to compare nil with number
stack traceback:
   1:  function `SetJumbleHint' at line 427 [file `D:\Server_Client\px\scripts\Jumble.lua']
   2:  function `StartJumblePhrase' at line 325 [file `D:\Server_Client\px\scripts\Jumble.lua']
   3:  function `StartJumbleGame' at line 166 [file `D:\Server_Client\px\scripts\Jumble.lua']
   4:  function `DataArrival' at line 92 [file `D:\Server_Client\px\scripts\Jumble.lua']
Title:
Post by: NotRabidWombat on 02 June, 2004, 17:58:05
There is no reason that line should be generating an error in Lua 4.0. However, I have no means to test this newer version of PtokaX so you are out of luck.

Petition for the release of betas!

-NotRabidWombat
Title:
Post by: bastya_elvtars on 02 June, 2004, 19:42:27
grrrrrrr

thx for that, will try it in my testhub that its the only script running... see whats then
Title:
Post by: bastya_elvtars on 04 June, 2004, 00:44:40
Strange it worked before... dunno but guess its a conflict :S
Title:
Post by: bastya_elvtars on 04 June, 2004, 01:01:18
Still doing that when running as a standalone script and resetting to original... :( but ppl demand
Title:
Post by: NotRabidWombat on 04 June, 2004, 02:39:24
PM me the copy of the PtokaX you are using. Hopefully people won't explode at this. "Blah! Blah! Blah! It wasn't released yet."

-NotRabidWombat
Title:
Post by: [NL]Pur on 05 June, 2004, 14:42:12
blah blah 15.25 is half year old
Title:
Post by: NotRabidWombat on 10 June, 2004, 18:38:06
I tried Jumble with 15.25 and it worked fine. You might of done something incorrect in the config file. Try a fresh copy and see if it works.

"blah blah 15.25 is half year old"

Yes, and VERY few scriptors have access to it OR the latest versions. Another reason to release betas.

-NotRabidWombat
Title:
Post by: bastya_elvtars on 10 June, 2004, 20:24:14
thx for looking me, rabid, i must have some scriipt  conflict... no time here to check, so back in september! :(
Title:
Post by: bastya_elvtars on 11 October, 2004, 23:51:11
just browsed this old thread, and now i know the solution

locale has been set in some of my scripts, so it stuffed al others

i tried with it, and got to kill ptokax completely :D

QuoteThe setlocale function gets two string arguments: The locale name and a
category, which specifies what features will be influenced by this locale. There
are six categories of locales: "collate" controls the alphabetic order of strings;
"ctype" controls the types of individual characters (e.g., what is a letter) and
the conversion between lower and upper cases; "monetary" has no influence in
Lua programs; "numeric" controls how numbers are formated; "time" controls
how date and time are formated (i.e., function date); and "all" controls all the
above functions. The default category is "all", so that if you call setlocale
with only the locale name it will set all categories. The setlocale function
returns the locale name, or nil if it fails (usually because the system does not
support the given locale).