Forum

> > CS2D > Scripts > lua Script bug
Forums overviewCS2D overview Scripts overviewLog in to reply

English lua Script bug

4 replies
To the start Previous 1 Next To the start

old lua Script bug

Blunt
User Off Offline

Quote
Hello find you the bug in the Script
Please help me

LUA ERROR:sys/lua/serverlua.lua:1: unfinished string near
''')'


addhook("join" ,myjoin")
function myjoin(id)
-- Laden-Teil. Wo der spieler seine daten lädt!
end

addhook("spawn","spawnmenu")
function spawnmenu(id)
parse("setarmor "..id.." 100")
parse("equip "..id.." 51")
my_spawn_menu(id)
end


function my_spawn_menu(id)
menu(id,"Weapons,Rifles,Pistols")
end
funcion my_rifles_menu(id)
menu(id,"Rifles,M4A1,<Zu faul zum schreiben>") -- Hier kommen die Waffen hin, mit Kommer dazwischen!
end
function my_pistols_menu(id)
menu(id,"Pistols,Deagle,<Sehe das Menü über mir!>") -- Sehe denn Kommentar über mir!
end

addhook("menu","mymenu")
function mymenu(id,t,b)
if t=="Weapons" then
if b==1 then
my_rifles_menu(id)
elseif b==2 then
my_pistols_menu(id)
end
end
if t=="Rifles" then
-- Der Code der Rifles inklusive Preis, das Speichern und das geben!
elseif t=="Pistols" then
-- Der Code der Pistolen inklusive Preis, das Speichern und das geben!
end

Script by Mc_Bownlinghead

old Re: lua Script bug

DarkLight66
User Off Offline

Quote
*facepalm*

You should learn how to read:

1
LUA ERROR:sys/lua/serverlua.lua:1: unfinished string near ''')'

1
addhook("join" ,myjoin")

change it to:

1
addhook("join" ,"myjoin")

old Re: lua Script bug

Blunt
User Off Offline

Quote
The bug is still there

wtf

LUA ERROR:sys/lua/serverlua.lua:17: '=' expected near 'my_rifles_menu'

thanks for help

old Re: lua Script bug

Flacko
User Off Offline

Quote
No it's not. It's another bug.

Change
1
funcion my_rifles_menu(id)
to
1
function my_rifles_menu(id)

old Re: lua Script bug

SilentDash
User Off Offline

Quote
Quote
-- Laden-Teil. Wo der spieler seine daten lädt!


Quote
-- Der Code der Rifles inklusive Preis, das Speichern und das geben!


Quote
-- Der Code der Pistolen inklusive Preis, das Speichern und das geben!


There you must add something... but i dont know how to save/load sry
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview