English Say-menu command

14 replies
Goto Page
To the start Previous 1 Next To the start
02.07.13 06:01:02 pm
Up
Homura Kami
User
Offline Off
Hey guys,I am making my lua but error stop I trying to make a say command with a menu command but these part doesn't work property
Spoiler >

I must work like these
Spoiler >

Thanky uo for every reply
02.07.13 06:07:39 pm
Up
DC
Admin
Offline Off
1. Always use code tags please!

2. I assume that humman.classes.words is a table which contains at leat "!humman class". Otherwise your code won't work. Make sure that you initialize that table correctly before using it.

3. See cs2d lua cmd parse
Parse is for CS2D commands, not for Lua functions. "humman.classes.classmenu" is NOT a CS2D function but probably a Lua function that you wrote yourself in Lua
Replace
Code:
1
parse("humman.classes.classmenu")

with just
Code:
1
humman.classes.classmenu()
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
02.07.13 08:09:12 pm
Up
Avo
User
Offline Off
Code:
1
humman.classes.classmenu()


I think he wants to open a menu for a player, so he needs to give ID parameter of certain player.

How about:
Code:
1
humman.classes.classmenu(p)
03.07.13 01:06:59 am
Up
Homura Kami
User
Offline Off
okey my lua(full) was here
Spoiler >

But the error was in line 14 so i show only that part
I hope i can fix it soon
03.07.13 01:07:58 am
Up
Xirot
User
Offline Off
@user Homura Kami: Use [code][/code]
Quote:
They are confused. God bless them. Amen. -DC
03.07.13 01:11:30 am
Up
Homura Kami
User
Offline Off
The error occer @line 14 pls fix
Spoiler >

Error log(for log)
Spoiler >

These is what happen
Spoiler >

Pls help me!
edited 1×, last 03.07.13 03:57:12 pm
03.07.13 05:05:27 pm
Up
Rainoth
Moderator
Offline Off
you have declared

Code:
1
human.classes.word

but not
Code:
1
human.classes.words


You're trying to get length of a non-existing table.
04.07.13 12:37:33 pm
Up
Homura Kami
User
Offline Off
Thx you everyone to give me hand.Now all error is gone but when i say !humman class it is idle help!
04.07.13 02:23:45 pm
Up
Rainoth
Moderator
Offline Off
user Homura Kami has written:
Thx you everyone to give me hand.Now all error is gone but when i say !humman class it is idle help!


You make it too complicated.
Just change hook to sth like.
Code:
1
2
3
4
5
6
addhook("say","yes")
function yes(id,t)
     if t=="!humman" then
          menu(id,"Humman class,Thief|Super Speed,Engineer|Buildings,Spy|Invisibility,Police|Shield&Machete,Soldier|FN2000,Heavy unit|RPG,Doctor|Medic armor,Terrorist|Grenade(s),SWAT|XM1014")   
     end
end

Also. You made a menu "Humman class" while the menu hook is expecting "Humman classes"
so you'll have to change either one of these so they both match.
06.07.13 12:39:09 am
Up
Homura Kami
User
Offline Off
Error line 11
Now my lua look like these
Spoiler >

Console logs
Spoiler >


Pls help!
06.07.13 12:50:24 am
Up
Avo
User
Offline Off
You ate part of the spawn hooh, dude. By the way:

Line 11 - add "then" at the end of the line.
06.07.13 02:18:51 am
Up
Rainoth
Moderator
Offline Off
Dude seriously ?
Did you even read what I wrote ?
Read it again.
And I provided a more simple way for say hook which has no grammatical errors.

In case you're absent-minded, I'll repeat myself.
You make a player get one menu but in menu hook check if there's another menu.

Say you say "Give me menu 1" and then check "if player has menu 2"

Now you get it ?
06.07.13 02:31:31 am
Up
pbeloto
User
Offline Off
please post your script for me to solve the problem
06.07.13 10:34:46 am
Up
mr_s
User
Offline Off
worapat,
your script have 9999999 problems
when i fix a problem another problem will appear
IMG:http://www.gs4u.net/350x20/cs2d/5.231.50.192:36963.png
06.07.13 03:43:27 pm
Up
Homura Kami
User
Offline Off
First post
Spoiler >


Next post:
@user mr_s:
Spoiler >

@user Rainoth:
Spoiler >

@everypost
Spoiler >

My new lua look like these(no bug now)
Spoiler >
edited 3×, last 07.07.13 02:43:55 am
To the start Previous 1 Next To the start