General > Developers Corner

Simple Question

<< < (2/3) > >>

Aaron113:
No, it would not.  I'll let you figure out why, it's a simple mistake.

MrPresident:

--- Quote from: Janjakob2000 on July 17, 2015, 03:45:44 PM ---I can't be bothered testing this as I have loads of other stuff to do, but would this work out?

--- End quote ---

I read this as: "I would rather just have you guys do this for me"
If you "can't be bothered" to help yourself, then you're probably not going to find much help here.

Janjakob2000:

--- Quote from: MrPresident on July 17, 2015, 08:14:36 PM ---I read this as: "I would rather just have you guys do this for me"
If you "can't be bothered" to help yourself, then you're probably not going to find much help here.

--- End quote ---
I'm sorry, but I really am really busy, and have already spend time browsing the internet for an answer, and tryed it on my own, but I'm just not that good at lua yet and don't know what would fix my problem, I'm sorry if I came over to you like that.  :(


--- Quote from: Aaron113 on July 17, 2015, 04:11:25 PM ---No, it would not.  I'll let you figure out why, it's a simple mistake.

--- End quote ---
I haven't really got a clue how to fix this, is it possibly because I'm calling the entity Player, but it should be something else, or did I just put it on the wrong line?
I'm sorry, I might be stupid probably :/

JamminR:

--- Quote from: Janjakob2000 on July 18, 2015, 02:57:27 AM ---is it possibly because I'm calling the entity Player, but it should be something else

--- End quote ---
Yes.
Player doesn't exist in your example.
Your error that you've not posted from console probably even tells you Player is nul.
Become used to understanding GMod lua errors.


--- Quote from: Janjakob2000 on July 18, 2015, 02:57:27 AM ---I'm sorry, I might be stupid probably :/

--- End quote ---
Now don't go getting all pitiful. It's not becoming of anyone.
Not once did we even indicate we thought you were, and you are intelligent enough to post and pick up on where your code might be going wrong.

MrPresident:
in your code, you are passing calling_ply through the function. This is going to be your player entity.

So instead of Player you would use calling_ply.
I hope that makes sense?

Notice the line right above the line you added is calling_ply:SendLua
You would need to use the same player entity for your PrintMessage function.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version