English if player exits.. (lua)

9 replies
Goto Page
To the start Previous 1 Next To the start
03.06.13 11:38:19 pm
Up
limonata
User
Offline Off
Hi all i was making a script but i need a help about this. Please check this codes.

Code:
1
2
3
4
5
6
7
8
9
10
11
if cmd == "!goto" then
          if player(pl,"exits") then
        if pl ~= nil and pl ~= id then
               parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
          else
               msg2(id,string.char(169).."255255000Correct syntax: !goto <id>")
               end
               else
               msg2(id,"No target!")
          end     
     end


It says all time "No target!" when i used !goto <id>

please help.
04.06.13 12:09:26 am
Up
Rainoth
Moderator
Offline Off
user limonata has written:
Hi all i was making a script but i need a help about this. Please check this codes.

Code:
1
2
3
4
5
6
7
8
9
10
11
if cmd == "!goto" then
          if player(pl,"exits") then
                  if pl ~= nil and pl ~= id then
                    parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
               else
                    msg2(id,string.char(169).."255255000Correct syntax: !goto <id>")
               end
          else
               msg2(id,"No target!")
          end     
     end


It says all time "No target!" when i used !goto <id>

please help.

Maybe because it has to check if player "exists" not "exits"

Always check the grammar.
04.06.13 04:02:20 pm
Up
limonata
User
Offline Off
Thanks. Grammer mistake Now it works.
04.06.13 04:23:24 pm
Up
Avo
User
Offline Off
Grammar mistake, exacly.
Trust me, I'm an engineer | user DC approved file cs2d Super extra mod for CS2D (64), yeah!
04.06.13 06:42:28 pm
Up
useigor
User
Offline Off
user Avo has written:
Grammar mistake, exacTly.
Oh, man... Please, in next time don't start when you didn't checked your comment. Just saying.
04.06.13 06:44:54 pm
Up
Infinite Rain
Reviewer
Offline Off
user useigor has written:
user Avo has written:
Grammar mistake, exaclTy.
Oh, man... Please, in next time don't start when you didn't checked your comment.
You wrote ''Exaclty''.
Edit
onvm
A thousand may fall at your side, ten thousand at your right hand, but it will not come near you. You will only look with your eyes and see the recompense of the wicked. - Psalm 91:7-8 ESV
04.06.13 06:45:26 pm
Up
useigor
User
Offline Off
user Infinite Rain has written:
user useigor has written:
user Avo has written:
Grammar mistake, exaclTy.
Oh, man... Please, in next time don't start when you didn't checked your comment.
You wrote ''Exaclty''.

I didn't as you can see. lol
04.06.13 06:46:18 pm
Up
Infinite Rain
Reviewer
Offline Off
@user useigor:
I just ninja'd you, ;p
A thousand may fall at your side, ten thousand at your right hand, but it will not come near you. You will only look with your eyes and see the recompense of the wicked. - Psalm 91:7-8 ESV
04.06.13 06:48:06 pm
Up
Avo
User
Offline Off
My first time of trolling status: success. Just saying.
Trust me, I'm an engineer | user DC approved file cs2d Super extra mod for CS2D (64), yeah!
04.06.13 06:53:45 pm
Up
krabob
User
Offline Off
How did you not see that it's the ever so famous 'exacly'-thread reference
People help the people
To the start Previous 1 Next To the start