PtokaX forum

Development Section => Your Developing Problems => Topic started by: Agent_Smith on 02 March, 2004, 17:57:55

Title: check nick
Post by: Agent_Smith on 02 March, 2004, 17:57:55
i want to make a code like this

if (cmd=="comand") and (nick=nick) then
--do function
end

how do i make a nickcheck??
Title:
Post by: VidFamne on 02 March, 2004, 18:12:06
if (cmd=="comand") and (user.sName="nick") then
--do function
end
Maybe
Title:
Post by: Agent_Smith on 02 March, 2004, 22:55:41
Thanks man

im working on a script and all i want to is to UNDERSTAND lua, and so i do. but i need some help.
Title:
Post by: kepp on 02 March, 2004, 23:36:51
QuoteOriginally posted by VidFamne
if (cmd=="comand") and (user.sName="nick") then
--do function
end
Maybe

:O
==
Title:
Post by: VidFamne on 03 March, 2004, 01:14:38
Sorry, I made a little typo.
It should be;if (cmd=="comand") and (user.sName=="nick") then  --<--it should be == instead of =
--do function
end
Title:
Post by: Agent_Smith on 03 March, 2004, 14:07:14
ok.

some1 got eny idea how i do a repeat until code??

in php the code locks like this

$times = 100;
$i = 0;
$user = user.sName;
while($i < $times)
        {
               echo $user " has flooded you" $i "times";
               $i ++;
           }


i hope this is possible in LUA

/Agent Smith
Title:
Post by: kepp on 03 March, 2004, 19:07:53
Start = 0
Stop = 100

repeat Start + 1
untill Start == Stop

I think, not so sure
Title:
Post by: VidFamne on 04 March, 2004, 05:19:08
Yepp,look >>here<< (http://lua-users.org/wiki/ControlStructureTutorial)