Nest qestion
 

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

Nest qestion

Started by Tarokkk, 20 December, 2003, 14:37:16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tarokkk

welcome_op_1 = " "user.iProfile.."neked annyi :D" <-- " " it is syntax error but How I correct it ?

   welcome_op_2 = ""
   welcome_op_3 = ""
   welcome_op_4 = ""
   welcome_op_5 = ""
   welcome_op_6 = ""

---
if ConnectOpmess == 1 then
   function OpConnected(user)
   Pillock = GetProfileName(user.iProfile)
        MessOp = random(5)

      if MessOp == 1 then
        SendToAll(Bot, welcome_op_1)
        
        elseif MessOp == 2 then
        SendToAll(Bot, welcome_op_2)
        
      elseif MessOp == 3 then
        SendToAll(Bot, welcome_op_3)

        elseif MessOp == 4 then
        SendToAll(Bot, welcome_op_4)
        
        elseif MessOp == 5 then
        SendToAll(Bot, welcome_op_5)

        elseif MessOp == 6 then
        SendToAll(Bot, welcome_op_6)

      end
   end
end

-- The variable is in the sttings.ini -- It's only detail

plop

welcome_op_1 = " "..user.iProfile.."neked annyi :D"

thats all, 2 dots were missing.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Tarokkk

Syntax Error: attempt to index global `user' (a nil value)

tezlo

there is no user on script start..
what you could do is make it a function

welcome_op_x = function(user) return "whatever "..user.iProfile end

and then SendToAll(Bot, welcome_op_x(user))

Tarokkk

--Welcomes
-- Users
welcome_users = "Hi ?s ?rezd j?l magad"
-- OPs
welcome_op_1 = ""
welcome_op_2 = ""
welcome_op_3 = ""
welcome_op_4 = ""
welcome_op_5 = ""


function NewUserConnected(user)
if Connectusermess == 1 then
SendToAll(Bot, user.sName..""..welcome_users)
end
end
----------------
if ConnectOpmess == 1 then
function OpConnected(user)
Pillock = GetProfileName(user.iProfile)
MessOp = random(5)
SendToAll(Bot,_________) --<--This is the qestion ?( ... What I have to write there ? welcome_op_(??? this is the number Mess OP)
end
end
end


----Thx

SMF spam blocked by CleanTalk