MyINFOArrival(User, Data)
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

MyINFOArrival(User, Data)

Started by dragos_sto, 16 May, 2007, 13:47:45

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dragos_sto

Code: lua
function MyINFOArrival(User, Data)
	SendToAll("MyINFOArrival","\r\n\t\tMyINFOArrival\r\ndate returnare \r\n "..Data.."\r\n")
	for key, value in pairs(User) do
		SendToAll("MyINFOArrival","date returnare User \r\n User."..key.." = "..value.."")
	end
end
[/color]


return
Code: actionscript
[14:38] <MyINFOArrival> 
		MyINFOArrival
date returnare 
 $MyINFO $ALL Plich <++ V:0.674,M:A,H:4/0/2,S:4>$ $LAN(T3)$$24338686918$
[14:38] 

[14:38] <MyINFOArrival> date returnare User 
 User.sDescription = 
[14:38] <MyINFOArrival> date returnare User 
 User.iOpHubs = 2
[14:38] <OnError> date returnare 
dragos work\ptokax 0.3.6.0\scripts\functii.lua:45: attempt to concatenate local 'value' (a function value)OnError
[/color]


what function it about ?
my ideea it whas to see the table of user
user. ... and the value of them

bastya_elvtars

What if you made a check and if value is not a string/number then not concatenate it?
Everything could have been anything else and it would have just as much meaning.

dragos_sto

let say i was curios of all the function
aveilable on user. ...

function MyINFOArrival(User, Data)
   SendToAll("MyINFOArrival","\r\n\t\tMyINFOArrival\r\ndate returnare \r\n "..Data.."\r\n")
   for key, value in pairs(User) do
      if (key~="Redirect" and key~="Ban" and key~="Disconnect" and key~="uptr" and key~="TempBan" and key ~= "TimeBan" and key~="NickBan" and key~="NickTempBan" and key~="DefloodWarn" and key~="SendPM" and key~="Kick" and key~="SendData") then
      SendToAll("MyINFOArrival","date returnare User \t\t\t User."..key.." = "..value.."\r\n")
      end
   end
end

all the function when i whant to see the value return error like this attempt to concatenate local 'value' (a function value)
User.Redirect
User.Ban

User.Disconnect
User.uptr
User.TempBan
User.TimeBan
User.NickBan
User.NickTempBan
User.DefloodWarn
User.SendPM
User.Kick
User.SendData

if you whant to see the data return to un unreg user let my know  ;D
when i look at scripting-interface
i understand why return it a function ,becaus it is :)

next time i will look careful

User:
-----
SendData(FromNick, Data)      - Data without ending | ! Max FromNick length 64 chars, max Data length 128000 chars.
SendData(Data)            - Data without ending | ! Max Data length 128000 chars.
SendPM(FromNick, Data)         - Data without ending | ! Max FromNick length 64 chars, max Data length 128000 chars.
Disconnect()
Kick(KickerNick, Reason)      - Reason without ending | ! Max KickerNick length 64 chars, max Reason length 128000 chars.
Kick(Reason)            - Reason without ending | ! Max Reason length 128000 chars.
Ban()
Ban(sReason, sBy, bFull)
NickBan()
NickBan(sReason, sBy)
TempBan()
TempBan(iTime, sReason, sBy, bFull)   - iTime is in minutes (0 = default tempban time from gui) !
TimeBan(iTime)            - iTime is in minutes (0 = default tempban time from gui) !
NickTempBan(iTime, sReason, sBy)   - iTime is in minutes (0 = default tempban time from gui) !
Redirect(Address)         - Max Address length 1024 chars.
Redirect(Address, Reason)      - Max Address length 1024 chars. Max Reason length 128000 chars.

are some function hoo i dont find in scripting interface
like User.uptr for example

bastya_elvtars

I suggest using the type() function.
Everything could have been anything else and it would have just as much meaning.

dragos_sto

i dont understand how ?
you kant show me an example pls.

bastya_elvtars

I rather give you suggestions so you can find out yourself (and learn):
- First read this.
- Then, you will find out how to select only number and string variables that can be concatenated into a string.
Everything could have been anything else and it would have just as much meaning.

dragos_sto

10x i whill read once again :)

Thor

Or maybe use tostring(), and you can see all the userobject, and which hasn't got 'normal' values, that's functions (afaik memory adresses :) )

dragos_sto

true after 2 month i work again whit lua :D
and some function i forget them :(

SMF spam blocked by CleanTalk