Forum

> > CS2D > Scripts > Buy menu in my script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Buy menu in my script

6 replies
To the start Previous 1 Next To the start

old closed Buy menu in my script

EndDead
User Off Offline

Quote
Hey all. am still learning lua so i tried to make a menu where you buy weapons from it for my master lua which i will get it here soon. in the menu you buy special weapons.
The part of buying in my script is:
Spoiler >

Am sure theres a problem with spaces or something.. if you can review it and fix it ill put you in the credits.
Thanks in advance

old Re: Buy menu in my script

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
if title=="Buy" then
if buton==1 then
menu(id,"Buy,Laser|5000$,Flamethrower|4000$,Rocket Launcher|3500$,Grenade Launcher|3000$,Light Armor|2200$,Armor|2500$")
end

You forgot an end there - it should close every if block.

1
2
end
elseif buton==2 then

You've got an extra end here - elseif doesn't require an end to go before it. This same error is made in every elseif block, so fix all of them.

Other than that, I can't see any serious errors aside from your English.

old Re: Buy menu in my script

EndDead
User Off Offline

Quote
user Avo has written
Wait, WTF is "Master Lua"

Well i meant that this script i posted was a part of my full lua/script which i have an error/problem in it.

@EngiN33R
Thanks. ill try and give you what i get.

old Re: Buy menu in my script

Jynxxx
User Off Offline

Quote
Here you go. Just like Engineer said you were missing end.
Spoiler >

old Re: Buy menu in my script

EndDead
User Off Offline

Quote
Thanks alot JeT and EngiN33R
now i learnt some tips in scripting and fixed my script, btw i spoted a wrong and fixed it but nvm

This thread can be closed. Problem solved.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview