Jump to content

Just a problem


Blueman

Recommended Posts

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" ) 
  

error3fx.png

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

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...