PtokaX forum

Development Section => Your Developing Problems => Topic started by: chaggydawg on 12 August, 2004, 19:23:50

Title: what is curUser:uptr
Post by: chaggydawg on 12 August, 2004, 19:23:50
sorry if this is wrong area for this question, I wasn't sure.

But, does anyone know what user data this is? or what this does or whatever? I got it in PtokaX DC Hub 0.3.3.0 build 15.25 [debug] .

curUser:uptr

Just curious.
thanx  :)
Title:
Post by: Herodes on 12 August, 2004, 19:29:12
I was curious too :) how did you get it ?
I have a slight idea about what userdata might be but 'll save it for some1 who really knows what it is ..
Title:
Post by: chaggydawg on 12 August, 2004, 19:39:37
I found it because I decided to do:

for i,v in curUser do
SendToAll("test", i)
end



 and see what the results were, it was the only thing listed I didn't recognize.
Title:
Post by: chaggydawg on 12 August, 2004, 19:50:27
where did you discover it from?
Title:
Post by: Herodes on 12 August, 2004, 19:54:48
I didn't ... I got it from ur first post .. it aroused my curiosity :)
Title:
Post by: chaggydawg on 12 August, 2004, 20:49:38
ahhh.. lol
well if you hear anything or figure something out, please let me know :)

btw, I tried, listing it as a string and running as a function, neither worked, (well if function worked, it did nothing obvious to me)
Title:
Post by: chaggydawg on 12 August, 2004, 20:55:52
maybe this will give a clue?


Syntax error: attempt to call field `uptr' (a userdata value)




maybe its the field userdata (history) is stored.... prolly wrong, but just throwin out idea to catch someones attention hehe

and here is the list I got it from:

[14:59] Kick
[14:59] Disconnect
[14:59] iProfile
[14:59] NickBan
[14:59] Ban
[14:59] sIP
[14:59] TimeBan
[14:59] iVersion
[14:59] TempBan
[14:59] SendPM
[14:59] sName
[14:59] sMyInfoString
[14:59] SendData
[14:59] uptr
[14:59] bOperator

Title:
Post by: NotRabidWombat on 12 August, 2004, 21:29:15
Probably stands for unsigned pointer.

This is a special type of type in C++ that allows the developer to "point" to the address of another variable. This probably points to the user object, socket connection, or some other data on the ptokax side. It may be used by PtokaX API, but as far as lua devs are concerned, it's useless.

The best way to investigate the hidden variables is with type(var).

-NotRabidWombat
Title:
Post by: Herodes on 12 August, 2004, 22:07:11
thats a remarkable display of insight and a quite possible answer I think .. :)
Title:
Post by: chaggydawg on 12 August, 2004, 22:07:40
thanx  :)

good now I can stop wondering about its usefullness lol  ;)