Jump to content

what's wrong?


daKillar2000

Recommended Posts

Posted

hi i create a login system but he gives 2 warning in this lines

  account = addAccount(username, password) 
  if (logIn(player, account, password) == true) then 

warning bad argument the line: acces denied addAcount | i put this in acl

  <object name="resource.newlogin" /> 

;

warning bad arguemnt the line : logIn

Edit by varez: added lua and code tags. I know you won´t but.. Use them next time

Posted
function loginHandler(player, username, password) 
 local account = getAccount(username, password) 
 if (account ~= false) then 
  if (logIn(player, account, password) == true) then 
   triggerClientEvent (player, "hideLoginWindow", getRootElement()) 
  else 
   triggerClientEvent (player, "unknownError", getRootElement()) 
  end 
 else 
  triggerClientEvent (player, "loginWrong", getRootElement()) 
 end 
end 
  
function registerHandler(player, username, password) 
 local account = getAccount(username, password) 
 if (account ~= false) then 
  triggerClientEvent(player, "registerTaken", getRootElement()) 
 else 
  account = addAccount(username, password) 
  if (logIn(player, account, password) == true) then 
   outputChatBox("If you want to change your password, use /changepw", player) 
   triggerClientEvent(player, "hideLoginWindow", getRootElement()) 
  else 
   triggerClientEvent(player, "unknownError", getRootElement()) 
  end 
 end 
end 
  
addEvent("submitLogin", true) 
addEvent("submitRegister", true) 
addEventHandler("submitLogin", root, loginHandler) 
addEventHandler("submitRegister", root, registerHandler) 

edit by guess who: same reason

Posted

use [lua][/lua] tags please, it makes the code more redeable.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

he said - use [lua][/lua] tags in your posts, not in your script o.O

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

i was always working (except for 3 days around 20th of Aug), and this is your first time you successfully used it - congratulations!

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

Don't Be lazy, do a little debug..

Just before login line output some debug strings with informations such as if your player element is valid, his nickname, given username and password, name of account that you are trying to log player into.

That's debugging.

I cannot tell you more without gui part, but i think it's not a problem to output some values, right?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

this made the register not works login works fine:)

-------Warnings

WARNING: login\script.lua:20: Access denied @ 'addAccount'

WARNING:login\script.lua:21: Bad argument @ 'logIn'

-------the lines

line20: account = addAccount(username, password)

line21: if (logIn(player, account, password) == true) then

Posted

post whole acl.xml

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

again, but bigger letters for better understanding

post whole acl.xml

and one more thing:

tell us your resource name (newlogin ?)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

ok xD

    
        
         
         
         
    
    
        
         
         
         
         
    
    
        
        
         
    
    
        
        
        
        
         
         
    
    
        
        
        
        
    
    
        
    
    
        
        
         
         
    
    
        
        
         
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    

  

  • Moderators
Posted

unless your group 'Everyone' has permissions to addAccount it wont work.

Instead, do this:

<group name="Admin"> 
        <acl name="Moderator" /> 
        <acl name="SuperModerator" /> 
        <acl name="Admin" /> 
        <acl name="RPC" /> 
        <object name="resource.admin" /> 
        <object name="resource.webadmin" /> 
        <object name="resource.login" /> 
</group> 

Posted

attach it here

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
<group name="Admin"> 
        <acl name="Moderator" /> 
        <acl name="SuperModerator" /> 
        <acl name="Admin" /> 
        <acl name="RPC" /> 
        <object name="resource.admin" /> 
        <object name="resource.webadmin" /> 
        <object name="resource.login" /> 
        <object name="user.Snaky" /> 
    </group> 

  • Moderators
Posted

I must ask, are you sure the resource which your register/login code is in, is called 'login' and not something else?

Posted

attach WHOLE resource here. we will say what you did wrong

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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