General > Developers Corner

Unable to figure out why my commands are not working.

<< < (2/4) > >>

feldma:
Just remove the # from the for i = 1, #target_ply.

Bytewave:

--- Quote from: feldma on March 03, 2016, 01:36:50 PM ---Just remove the # from the for i = 1, #target_ply.

--- End quote ---
uh... No. That's the list length operator in Lua.

OP, take a look at your commands. You expect a table of players, target_plys, but you have a PlayerArg parameter specified below. Change PlayerArg to PlayersArg, assuming you want to run it on multiple people.

roastchicken:
...and this is why we don't start two threads.

As I said in the other thread, and as Bytewave has said here, the problem is he is treating a userdata (target_plys is referring to a player) as a table because he isn't telling ULX to use the PlayersArg and is instead telling it to use PlayerArg.

I'm legitimately interested as to why you think removing the pound sign would work though, feldma. (I tried very hard to resist the urge to calling it a hashtag, I must admit.)

MaDmaxwell:
Thank you all. I have edited the file and waiting on a map switch. Thanks again.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version