View Full Version : Does $userid represent a certain value from the db?
revloc02c
08-15-2011, 11:12 PM
I was trying to use $userid to pass a parameter into a SQL stored procedure in my db. I expected the value to be from the id column of my toon in the character_ table (which = 1) but got something completely different (53?). I am wondering if the value contained in the $userid variable corresponds to a column in some table of the db, or does it come from somewhere else entirely (perhaps generated on the client side?). Anyone know?
lerxst2112
08-16-2011, 12:04 AM
It looks like it is just a number that increments as things are added to the entity list.
Try Client::AccountID()
joligario
08-16-2011, 12:08 AM
Yes, it is an entity id. If you want the true characterid from the database, you should use $client->CharacterID()
revloc02c
08-16-2011, 12:14 AM
It looks like it is just a number that increments as things are added to the entity list.
Try Client::AccountID()
Ah-ha, that makes sense. Thanks.
Yes, it is an entity id. If you want the true characterid from the database, you should use $client->CharacterID()
And thanks, just what I needed.
lerxst2112
08-16-2011, 12:35 AM
It looks like that gets exported as $charid as well.
revloc02c
08-16-2011, 01:09 AM
Sure enough, works like a charm too. Sheesh, I prolly shoulda just tried that. Thanks again lerxst.
I looked hard for it here (http://www.eqemulator.net/wiki/wikka.php?wakka=QuestTutorial) under the "Variables" section but it is not listed. Should it be added in there?
lerxst2112
08-16-2011, 02:00 AM
Yeah, probably, but there may be others missing. I found it digging through the code, but it's on the list here as well. http://www.eqemulator.net/wiki/wikka.php?wakka=QuestCheatSheet
If you search the code for "ExportVar" you can find them all. Some depend on which event is being triggered, but they're all pretty much in that one function.
trevius
08-16-2011, 02:38 AM
Yes, it was missing, so I just went ahead and added it. Anyone is welcome to create a wiki account and add/edit pages as needed, FYI.
revloc02c
08-16-2011, 09:01 PM
Yeah, probably, but there may be others missing. I found it digging through the code, but it's on the list here as well. http://www.eqemulator.net/wiki/wikka.php?wakka=QuestCheatSheet
Ah okay, I didn't look there. Heh, just used to looking in the one place.
If you search the code for "ExportVar" you can find them all. Some depend on which event is being triggered, but they're all pretty much in that one function.
Good info, thanks lerxst. I am sure I'll use that sometime.
Anyone is welcome to create a wiki account and add/edit pages as needed, FYI.
Oh, I didn't know that. I need to look into it, thanks Trev.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.