Jump to content




Attempt to call nil

computer

  • You cannot reply to this topic
6 replies to this topic

#1 Qustion

  • Members
  • 5 posts
  • LocationThis Photo is fromhttp://s835.photobucket.com/user/Winzenhimer/media/Player_Complete_Animation_v3.gif.html

Posted 17 August 2016 - 06:08 PM

Hello,

I would like to display a button on a screen.
To do this I have written following code: http://pastebin.com/z9XJbyux
My problem is that it allways tells me ":9 attempt to call nil".
I am clueless to why it tells me this.
I would very much appriciate a sollution.

Thank you

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 17 August 2016 - 06:33 PM

Lua is case-sensitive. Use mon.setCursorPos() instead.

#3 Qustion

  • Members
  • 5 posts
  • LocationThis Photo is fromhttp://s835.photobucket.com/user/Winzenhimer/media/Player_Complete_Animation_v3.gif.html

Posted 18 August 2016 - 04:52 AM

Thank you, that helped

I have added the rest of the code I had initially planned, however I have encountered an error that I had solved before my topic post.
It tells me in line 7 "attempt to index ? (a number value).
I have researced this Error, but I cannot explain why it is telling me this, my idea was that it isn't passing out the string from the table.
Heres the code : http://pastebin.com/x4S9X6me
I would be very thankful about some help.

#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 18 August 2016 - 07:46 PM

Get rid of the for loop and use _table.xMin instead of v.xMin, etc.

#5 Qustion

  • Members
  • 5 posts
  • LocationThis Photo is fromhttp://s835.photobucket.com/user/Winzenhimer/media/Player_Complete_Animation_v3.gif.html

Posted 19 August 2016 - 04:23 AM

I have added the part of the code, I had initially planned to use, but now I am recieving a different Error.
I haven't found any solutions to ":7: attempt to index ? (a number) and I would be very thankful for some help

http://pastebin.com/x4S9X6me

Edited by Bomb Bloke, 19 August 2016 - 07:06 AM.


#6 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 19 August 2016 - 09:34 PM

View PostLyqyd, on 18 August 2016 - 07:46 PM, said:

Get rid of the for loop and use _table.xMin instead of v.xMin, etc.


#7 Qustion

  • Members
  • 5 posts
  • LocationThis Photo is fromhttp://s835.photobucket.com/user/Winzenhimer/media/Player_Complete_Animation_v3.gif.html

Posted 21 August 2016 - 09:15 AM

soory that I copied that, I was wondering why I couldn't post anything because I didn't reload the page so I posted again, thank you for the help





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users