Feche1320 Posted March 8, 2012 Share Posted March 8, 2012 if bet.sourcep[i] == source then attempt to index field 'sourcep' (a userdata value) bet.sourcep contains the source of the player that executed the command, and bet.sourcep contains the right userdata becouse when I want to get the name of it, it ouputs it correctly.. so what is wrong with it? Link to comment
Castillo Posted March 8, 2012 Share Posted March 8, 2012 Try this: if ( bet[sourcep][i] == source )then Link to comment
Cadu12 Posted March 8, 2012 Share Posted March 8, 2012 Or just: if bet["sourcep"][i] == source then Link to comment
Castillo Posted March 8, 2012 Share Posted March 8, 2012 @Cadu12: As far as I know "sourcep" is a player userdata, if you put it as "sourcep" it'll be a string. Link to comment
Feche1320 Posted March 9, 2012 Author Share Posted March 9, 2012 Yes, Solidsnake14's code just worked like a charm. Thanks! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now