Blueman Posted June 9, 2011 Share Posted June 9, 2011 I was wondering if anyone can help me with this although I don't like asking for help alot. MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) Uploaded with ImageShack.us If this helps the script contains 2 scripts A serversided script named milis.lua which is the one causing the error, and a client side script called milic.lua with no errors. Link to comment
Castillo Posted June 9, 2011 Share Posted June 9, 2011 Post your whole server side script, 2 lines won't help this time. Link to comment
Blueman Posted June 9, 2011 Author Share Posted June 9, 2011 addEvent ("Gen", true) addEvent ("Col", true) addEvent ("Rct", true) addEvent ("Pvt", true) addEvent ("Sgt", true) addEvent ("Dsgt", true) addEvent ("Ng", true) addEvent ("Mscr", true) addEvent ("Rem", true) local M1 = "Gen" local M2 = "Col" local M3 = "Rct" local M4 = "Pvt" local m5 = "Sgt" local m6 = "Dsgt" local M7 = "NG" local M8 = "Mscr" local M9 = "Banned" MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) function Gen() setAccountData ( mtext, "mili.pos", M1 ) end addEventHandler ("Gen", getRootElement(), Gen) function Col() setAccountData ( mtext, "mili.pos", M2 ) end addEventHandler ("Col", getRootElement(), Col) function Rct() setAccountData ( mtext, "mili.pos", M3 ) end addEventHandler ("Rct", getRootElement(), Rct) function Pvt() setAccountData ( mtext, "mili.pos", M4 ) end addEventHandler ("Pvt", getRootElement(), Pvt) function Sgt() setAccountData ( mtext, "mili.pos", M5 ) end addEventHandler ("Sgt", getRootElement(), Sgt) function Dsgt() setAccountData ( mtext, "mili.pos", M6 ) end addEventHandler ("Dsgt", getRootElement(), Dsgt) function Ng() setAccountData ( mtext, "mili.pos", M7 ) end addEventHandler ("Ng", getRootElement(), Ng) function Mscr() setAccountData ( mtext, "mili.pos", M8 ) end addEventHandler ("Mscr", getRootElement(), Mscr) function Rem() setAccountData ( mtext, "mili.pos", m9 ) end addEventHandler ("Rem", getRootElement(), Rem) A lil bit simple Link to comment
Castillo Posted June 9, 2011 Share Posted June 9, 2011 addEvent ("Gen", true) addEvent ("Col", true) addEvent ("Rct", true) addEvent ("Pvt", true) addEvent ("Sgt", true) addEvent ("Dsgt", true) addEvent ("Ng", true) addEvent ("Mscr", true) addEvent ("Rem", true) local M1 = "Gen" local M2 = "Col" local M3 = "Rct" local M4 = "Pvt" local m5 = "Sgt" local m6 = "Dsgt" local M7 = "NG" local M8 = "Mscr" local M9 = "Banned" function Gen() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M1 ) end addEventHandler ("Gen", getRootElement(), Gen) function Col() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M2 ) end addEventHandler ("Col", getRootElement(), Col) function Rct() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M3 ) end addEventHandler ("Rct", getRootElement(), Rct) function Pvt() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M4 ) end addEventHandler ("Pvt", getRootElement(), Pvt) function Sgt() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M5 ) end addEventHandler ("Sgt", getRootElement(), Sgt) function Dsgt() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M6 ) end addEventHandler ("Dsgt", getRootElement(), Dsgt) function Ng() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M7 ) end addEventHandler ("Ng", getRootElement(), Ng) function Mscr() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", M8 ) end addEventHandler ("Mscr", getRootElement(), Mscr) function Rem() MPlayeraccount = getPlayerAccount (source) MAccount = getAccountData ( MPlayeraccount, "mili.pos" ) setAccountData ( MPlayeraccount, "mili.pos", m9 ) end addEventHandler ("Rem", getRootElement(), Rem) Link to comment
Blueman Posted June 9, 2011 Author Share Posted June 9, 2011 The MPlayer account is for the client side script but I see what I did wrong thanks. Link to comment
Aibo Posted June 9, 2011 Share Posted June 9, 2011 addEvent ("Gen", true) addEvent ("Col", true) addEvent ("Rct", true) addEvent ("Pvt", true) addEvent ("Sgt", true) addEvent ("Dsgt", true) addEvent ("Ng", true) addEvent ("Mscr", true) addEvent ("Rem", true) imo, this is redundant, why not create 1 event and send your "Mscr/Rem/Ng" or whatever as an argument? Link to comment
Blueman Posted June 9, 2011 Author Share Posted June 9, 2011 Never thought of that thanks, I might use that in the future. 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