Author Topic: interpretation of error message  (Read 1652 times)

0 Members and 1 Guest are viewing this topic.

Offline blackwings

  • Scripter
  • King
  • ******
  • Posts: 986
  • Karma: +12/-8
interpretation of error message
« on: 23 August, 2005, 18:19:35 »
Is it correct that the error messages written in the order of the varibles on the line the error message says.
For example, this first code error message says "compare nil with number" =
Code: [Select]
function Main()
if nil<3 then
i = "yes"
end
end

[17:56] Syntax C:\ptokax03321\scripts\errorTest.lua:2: attempt to compare nil with number
but this second code says "compare number with nil" when you switch on the comparison in if =
Code: [Select]
function Main()
if 3 i = "yes"
end
end

[17:57] Syntax C:\ptokax03321\scripts\errorTest.lua:2: attempt to compare number with nil
So am I right?


PtokaX forum

interpretation of error message
« on: 23 August, 2005, 18:19:35 »

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
(No subject)
« Reply #1 on: 23 August, 2005, 18:38:59 »
You are, I have seen this several times.
Everything could have been anything else and it would have just as much meaning.

PtokaX forum

(No subject)
« Reply #1 on: 23 August, 2005, 18:38:59 »