Jump to content




os.pullEvent("mouse_click") - Syntax error (solved)


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

#1 Dustmuz

  • Members
  • 174 posts
  • LocationDenmark

Posted 24 November 2015 - 11:51 PM

Hello fellow ComputerCrafters

i hope this is an easy fix..

im getting a syntax error in this line

local event, button, MouseX, MouseY = os.pullEvent("mouse_click") (Solved)
Is there anything wrong with that line? or should i look elsewhere in my program?


New problem: http://pastebin.com/5DLmVSzP
Window:88: expected number (solved)
a pair of "" had found its way into a setTextColor()

Edited by Dustmuz, 25 November 2015 - 07:37 AM.


#2 Dragon53535

  • Members
  • 973 posts
  • LocationIn the Matrix

Posted 24 November 2015 - 11:52 PM

try the line above it

#3 Waitdev_

  • Members
  • 432 posts
  • LocationAdelaide

Posted 25 November 2015 - 06:26 AM

can you post full code and the line number please? that would help us help you. though, try doing
e,b,x,y = os.pullEvent("mouse_click")


#4 Dustmuz

  • Members
  • 174 posts
  • LocationDenmark

Posted 25 November 2015 - 06:57 AM

Dragon was right on this one.. it was the line above it..


But now i ran into a new problem..
window:88: expected number

http://pastebin.com/5DLmVSzP
only problem is.. my code is only 69 lines long..
(updated top post aswell)

Edited by Dustmuz, 25 November 2015 - 07:05 AM.


#5 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 25 November 2015 - 07:09 AM

If the window API causes an error, it most likely is a malformed term call.

//Edit: on line 28 you are using a string for .setTextColor, but it wants a number.

Edited by H4X0RZ, 25 November 2015 - 07:11 AM.


#6 Dustmuz

  • Members
  • 174 posts
  • LocationDenmark

Posted 25 November 2015 - 07:24 AM

arh.. didnt even notice that one :)
thanks for that one.. i'll check if that solved the problem (need to boot my game)

#7 Waitdev_

  • Members
  • 432 posts
  • LocationAdelaide

Posted 25 November 2015 - 10:51 AM

might want to point out, the colours api is your friend. for example you did setTextColor(green), which needs to be setTextColour(colours.green) (or colors.green)
do "help colours" in the shell for more colours

#8 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 25 November 2015 - 10:57 AM

Line 5 has him covered there.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users