Forum

> > CS2D > Scripts > how do I make my script.
Forums overviewCS2D overview Scripts overviewLog in to reply

English how do I make my script.

11 replies
To the start Previous 1 Next To the start

old how do I make my script.

MethodMan
User Off Offline

Quote
this script and I'm only trying to edit and edit but not to post.

addhook("serveraction","spot")
function spot(id,g)
if g==3 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 1,Dragon Wings,Resized Demon Wings,Arctic Wings,Andromedar Wings,Void Arctic Wings,Gold Wings,Layer Of Hero,Phoenix Armor,Next",1,1,200+id)
end
end

addhook("menu","menuspot")
function menuspot(id,title,button)
if title=="Wings Mods By Nahuelpet ( W4R ) 1" then
if button==1 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/dragon.png",1,1,200+id)
elseif button==2 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/resized_demon.png",1,1,200+id)
elseif button==3 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/Arctic.bmp",1,1,200+id)
elseif button==4 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/andromedar.png",1,1,200+id)
elseif button==5 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/void_angel.png",1,1,200+id)
elseif button==6 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/Gold.png",1,1,200+id)
elseif button==7 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/layer_of_hero.png",1,1,200+id)
elseif button==8 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/Phoenix_set.png",1,1,200+id)
elseif button==9 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 2,Dark Angel Wings,Evil Wings,Bat Wings,Fairy Wings,Raven Wings,Angel Wings,Layer Of Evil,Wizard Set,Nothing")
end
end
if title=="Wings Mods By Nahuelpet ( W4R ) 2" then
if button==1 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/Dark_Angel.png",1,1,200+id)
elseif button==2 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/evil.png",1,1,200+id)
elseif button==3 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/bat.png",1,1,200+id)
elseif button==4 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/Fairy.png",1,1,200+id)
elseif button==5 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/raven.png",1,1,200+id)
elseif button==6 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/angel.png",1,1,200+id)
elseif button==7 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/layer_of_evil.png",1,1,200+id)
elseif button==8 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/Wizard_set.png",1,1,200+id)
elseif button==9 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 2,Dark Angel Wings,Evil Wings,Bat Wings,Fairy Wings,Raven Wings,Angel Wings,Layer Of Evil,Wizard Set,Nothing")
end
end
end
if title=="Wings Mods By Nahuelpet ( W4R ) 3" then
if button==1 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/adminhorse.png.",1,1,200+id)
elseif button==2 then
freimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/angel_wing_.png",1,1,200+id)
elseif button==3 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/basecap_grey.png",1,1,200+id)
elseif button==4 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/cowboy_hat.png",1,1,200+id)
elseif button==5 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/devil.png",1,1,200+id)
elseif button==6 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/dragonmount.png",1,1,200+id)
elseif button==7 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/drink_helmet.png",1,1,200+id)
elseif button==8 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/flower.png",1,1,200+id)
elseif button==9 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 2,Dark Angel Wings,Evil Wings,Bat Wings,Fairy Wings,Raven Wings,Angel Wings,Layer Of Evil,Wizard Set,Nothing")
end
end
end
------------------------------------------------------
this and the part I tried to edit.

if title=="Wings Mods By Nahuelpet ( W4R ) 3" then
if button==1 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/adminhorse.png.",1,1,200+id)
elseif button==2 then
freimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/angel_wing_.png",1,1,200+id)
elseif button==3 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/basecap_grey.png",1,1,200+id)
elseif button==4 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/cowboy_hat.png",1,1,200+id)
elseif button==5 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/devil.png",1,1,200+id)
elseif button==6 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/dragonmount.png",1,1,200+id)
elseif button==7 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/drink_helmet.png",1,1,200+id)
elseif button==8 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/flower.png",1,1,200+id)
elseif button==9 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 2,Dark Angel Wings,Evil Wings,Bat Wings,Fairy Wings,Raven Wings,Angel Wings,Layer Of Evil,Wizard Set,Nothing")
end
end
end

but it gave error.

LUA ERROR: sys/lua/d.lua:98: '<eof>' expected near 'end'



I have all the images and extracts all in the correct folder.


and What do I do now? help me.

very thanks.


sorry bad speak english!

old Re: how do I make my script.

DannyDeth
User Off Offline

Quote
an If statement is missing an end statement. Count the number of 'if's and then count the number of 'end's, if they aren't the same number, then add a few 'end's until they are the same.

old Re: how do I make my script.

MethodMan
User Off Offline

Quote
show me where to look the part, "I'm trying to edit"

if title=="Wings Mods By Nahuelpet ( W4R ) 3" then
if button==1 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/adminhorse.png.",1,1,200+id)
elseif button==2 then
freimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/angel_wing_.png",1,1,200+id)
elseif button==3 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/basecap_grey.png",1,1,200+id)
elseif button==4 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/cowboy_hat.png",1,1,200+id)
elseif button==5 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/devil.png",1,1,200+id)
elseif button==6 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/dragonmount.png",1,1,200+id)
elseif button==7 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/drink_helmet.png",1,1,200+id)
elseif button==8 then
freeimage(id)
id1=image("gfx/Wings Mods By Nahuelpet ( W4R )/flower.png",1,1,200+id)
elseif button==9 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 2,Dark Angel Wings,Evil Wings,Bat Wings,Fairy Wings,Raven Wings,Angel Wings,Layer Of Evil,Wizard Set,Nothing")
end
end
end



show me the error.

old Re: how do I make my script.

RAVENOUS
BANNED Off Offline

Quote
Also, functions and for-loops has to be ended with an end.

Download Notepad++ and look up the [+] on the side. if there is no end to the bottom, you may change that.

old Re: how do I make my script.

Sapiens
User Off Offline

Quote
1
2
3
4
5
6
addhook("serveraction","spot")
function spot(id,g)
if g==3 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 1,Dragon Wings,Resized Demon Wings,Arctic Wings,Andromedar Wings,Void Arctic Wings,Gold Wings,Layer Of Hero,Phoenix Armor,Next",1,1,200+id)
end
end

it is wrong dont edit on menu.

remove serveraction and write this on serveraction:
1
2
3
4
5
6
addhook("serveraction","spot")
function spot(id,g)
if g==3 then
menu(id,"Wings Mods By Nahuelpet ( W4R ) 1,Dragon Wings,Resized Demon Wings,Arctic Wings,Andromedar Wings,Void Arctic Wings,Gold Wings,Layer Of Hero,Phoenix Armor,Next")
end
end

old Re: how do I make my script.

asdbanana
User Off Offline

Quote
Shust read how many if's and end's you ahve , if you have less end's than if's then add end's so there is same number of end's like if's !

old Re: how do I make my script.

PeterToman
COMMUNITY BANNED Off Offline

Quote
put code tags and tabbing . (press the |<-- -->| at your keyboard,lol.

how to use code tags: [ code](text)[/code]
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview