![]() |
Quote:
I've looked in to creating VIEWS, but I'm not sure if I'm doing it correctly. PHP Code:
|
Would using this in an onPlayerLogin() still work? I tried Stefan's sample age code thing, and I get the working output, but if i try to edit it the slightest bit and use findPlayer( p.account ); (p is a param in the onPlayerLogin() function) I get this:
NPC Code:Accounts in database: 0 Here's what I'm using: PHP Code:
|
Quote:
PHP Code:
Also, you don't really need the first sql query if you have already created the table (but I guess it doesn't really hurt to include it). And, you don't need to do the findplayer(), since the 'p' passed in is a player object (so you could use temp.p.account and temp.p.id right off the bat). |
Quote:
|
It's better to format queries like this:
PHP Code:
|
Quote:
|
Quote:
NPC Code:Accounts in database: 0 Although, not sure since it could have been Stefan's suggestion that broke it ;o |
Quote:
Also, SQLite only has a few column types: TEXT, NUMERIC, INTEGER, REAL, NONE. Other types work for compatibility but they're just aliases for one of these types, I suggest these be used for clarity. http://www.sqlite.org/datatype3.html |
Quote:
Update: fixed it, will work fine with the next npcserver update. |
Well until the next update I've been using this as a work around.
PHP Code:
|
Quote:
|
Quote:
Also I noticed that you seem to have changed the behavior of trigger(), if this was intentional than I'm very annoyed because that's not something you should change without warning. Example: #1. trigger onSpecial() with trigger("Special", ...): FAIL #2. trigger onSpecial() with trigger("onSpecial", ...): SUCCEED #3. trigger Special() with trigger("Special", ...): FAIL #1 is how it used to work, #2 is how it works now, and #3 shouldn't work either way, but you would think it would if #2 does. I assume you've changed this to eliminate the inconsistency with functions that use event names and whether the "on" prefix is part of the event name. Note: This is all on the same object, if it behaves differently when triggering other objects then I'd like to know. Edit: #1 works fine when triggering to a different object, I guess doing #1 on self makes the event catchable by catchevent()? |
Quote:
|
Quote:
|
Quote:
|
All times are GMT +2. The time now is 02:12 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.