MikeyM's Question Thread (MySQL and other things)

Here I will post my questions, most with be with NPCs, and MySQL, others may not be with anything.

Q: When using MySQLoo, My HUD does not seem to be updating or even working at all for that matter. There are no LUA errors its just not seeming to connect. What can it be?
A: ?
Code: None.

Q: How do I get an entity to sit like a box when you gravgun it/physgun it?
A: Unknown
Code: None

1: That means that mysqloo doesn’t have a function called query. That is because you need to connect to a database first, see http://www.facepunch.com/threads/933647-Gm_MySql-v1.0-OO-edition. for an example.

2: It probably isn’t possible for Lua scripts in gmod to interact with Steam’s browser. (except with the HTML control)

3: Try making it have a flat bottom.

  1. Yes it does, I’m connecting in another file though… Does it not stay consecutively run?
  2. Yes it is, I’ve seen it done before.
  3. Its a premade model, How?

1: You also need to call db:query instead of mysqloo:query, as in the example. (Where db is the database that is returned from mysqloo:connect)
2: I don’t know how then.
3: If it’s a premade model then you can’t really change its physbox. So in ENT:Initialize try calling http://wiki.garrysmod.com/?title=Entity.PhysicsInitBox instead of PhysicsInit

How do I know whats returned?

because you put it in a variable:
MyDatabase = mysqloo:connect(whatever is supposed to go here)

– later
MyDatabase:query(whatever is supposed to go here)

edit: Fixed, just gave up since my HUD and Stuff wasn’t working.

  1. http://wiki.garrysmod.com/?title=Gui.OpenURL

You are asking us for the numeric value of x + x by saying that.

If your going to fail troll my threads, Don’t post.