Forum

> > CS2D > Scripts > Money script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Money script

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Money script

Gorillaz BR
User Off Offline

Zitieren
Hi,i'm new to lua,i'm reading some tutorials,then i make this little script:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("say","txt")

money=0

function txt(player,text)
if (text=="!allowance") then
	money=..money+10
end
end

function txt(player,text)
if(text=="!balance") then
msg("your money balance:"..money" dollars")
end
end

but,when i say "!allowance" i have this error:

1
unexpected symbol near '..'

some help?

alt Re: Money script

kalis
User Off Offline

Zitieren
try :
1
2
3
4
5
6
7
8
9
10
money=0
addhook("say","txt")
function txt(id,text)
if (text=="!allowance") then
     money=money+10
end
if(text=="!balance") then
msg("your money balance:"..money.." dollars")
end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht