Jump to content




[LUA][HELP] Can't input


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

#1 Mackan90096

  • Signature Abuser
  • 518 posts
  • LocationIn my basement.

Posted 20 May 2013 - 05:44 AM

Hi! I'm working on a "shop" thing. (Don't ask why, I'm bored)

But when I try to input a new shop name in the "admin" function with input 1 it wont work, Wont show up. What am I doing wrong? Code:

Edit: I'm also using CC-emu if it's any help

Spoiler


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 20 May 2013 - 01:45 PM

Strings aren't numbers. Try comparing the input to "1" instead.

#3 Mackan90096

  • Signature Abuser
  • 518 posts
  • LocationIn my basement.

Posted 21 May 2013 - 03:30 AM

Ah, thanks :)

Edit
Using the tostring() function ?

#4 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 21 May 2013 - 09:13 AM

Use

if input == "1" then
  ...
end






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users