Jump to content

Search the Community

Showing results for tags 'return'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Bulletin Centre
    • Community News
    • Repository News
    • Ragnarok News
  • Hercules Development Centre
    • Development Discussion
    • Suggestions
    • Development Centre Archives
  • Support & Releases
    • General Server Support
    • Database
    • Scripting
    • Source
    • Plugin
    • Client-Side
    • Graphic Enhancements
    • Other Support & Releases
  • Hercules Community
    • General Discussion
    • Projects
    • Employment
    • Server Advertisement
    • Arts & Writings
    • Off Topic
  • 3CeAM Centre
    • News and Development
    • Community
  • International Communities
    • Filipino Community
    • Portuguese Community
    • Spanish Community
    • Other Communities

Categories

  • Client Resources
  • Graphic Resources
    • Sprites & Palettes
    • Maps & Textures
    • Other Graphics
  • Server Resources
    • Server Managers / Editors Releases
    • Script Releases
    • Source Modifications
    • Plugins
    • Pre-Compiled Server
  • Web Resources

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Discord


Skype


IRC Nickname


Website URL


Location:


Interests


Github

Found 1 result

  1. I have the following script: // Main Script- script L_Test -1,{ // Configuration set .useLastMAC,0; // When player logins into game OnPCLoginEvent: // Load account info setarray @accountInfo$,callfunc("L_GetAccountInfo"); debugmes "[OnPCLoginEvent] account_id = " + @accountInfo$[0]; debugmes "[OnPCLoginEvent] last_ip = " + @accountInfo$[1]; debugmes "[OnPCLoginEvent] last_mac = " + @accountInfo$[2]; end; }// Helper Function: Load Account Info// Returns Array (0 = Account ID | 1 = Last IP | 2 = Last Mac)function script L_GetAccountInfo { setarray .accountInfo$[0],getcharid(3); if (getvariableofnpc(.useLastMAC,"L_Test") == 1) { query_sql("SELECT last_ip, last_mac FROM login WHERE account_id = "+ .accountInfo$[0], .last_ip$, .last_mac$); setarray .accountInfo$[1],.last_ip$,.last_mac$; } else { query_sql("SELECT last_ip FROM login WHERE account_id = "+ .accountInfo$[0], .last_ip$); setarray .accountInfo$[1],.last_ip$,"-"; } debugmes "[L_GetAccountInfo] account_id = " + .accountInfo$[0]; debugmes "[L_GetAccountInfo] last_ip = " + .accountInfo$[1]; debugmes "[L_GetAccountInfo] last_mac = " + .accountInfo$[2]; return .accountInfo$;} With this script enabled, when I login - I get the following output in map server: [Debug]: script debug : 2000000 110034179 : [L_GetAccountInfo] account_id = 2000000[Debug]: script debug : 2000000 110034179 : [L_GetAccountInfo] last_ip = 127.0.0.1[Debug]: script debug : 2000000 110034179 : [L_GetAccountInfo] last_mac = -[Debug]: script debug : 2000000 110034179 : [OnPCLoginEvent] account_id = 2000000[Debug]: script debug : 2000000 110034179 : [OnPCLoginEvent] last_ip =[Debug]: script debug : 2000000 110034179 : [OnPCLoginEvent] last_mac = Basically, within the function L_GetAccountInfo I load account details (account_id, last_ip, last_mac) based on npc config and return it as a array. When I set this function ret val to a array variable, it doesn't seem to be working. Any ideas? Only the first index's value appears to be returned by the function (2nd and 3rd index is empty).
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.