Forum

> > CS2D > Scripts > [Script error], you can fix?
Forums overviewCS2D overview Scripts overviewLog in to reply

English [Script error], you can fix?

5 replies
To the start Previous 1 Next To the start

old [Script error], you can fix?

4Vendetta
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("spawn","_spawn")

function _spawn(id)
     local team=player(id,"team")
     if team==1 then
          p=image("gfx/4V/'T'..math.random(1, 3)..'.bmp',1,0,200+id,0)
          parse("speedmod "..id.." 10")
     elseif team==2 then
          parse("speedmod "..id.." -10")
          p=image("gfx/4V/'CT'..math.random(1, 3)..'.bmp',1,0,200+id,0)
     end

end


old Re: [Script error], you can fix?

Suprise
BANNED Off Offline

Quote
im not scripter but I think you forgot to " end of images:

1
p=image("gfx/4V/'T'..math.random(1, 3)..'.bmp',1,0,200+id,0")

sry if im wrong!

old Re: [Script error], you can fix?

4Vendetta
User Off Offline

Quote
user Suprise has written
im not scripter but I think you forgot to " end of images:

1
p=image("gfx/4V/'T'..math.random(1, 3)..'.bmp',1,0,200+id,0")

sry if im wrong!


Now I got this error!
IMG:https://img269.imageshack.us/img269/7573/ronasjhg.png

old Re: [Script error], you can fix?

EngiN33R
Moderator Off Offline

Quote
user Suprise has written
im not scripter but I think you forgot to " end of images:

1
p=image("gfx/4V/'T'..math.random(1, 3)..'.bmp',1,0,200+id,0")

sry if im wrong!


He's right, the image lines should look like this:
1
2
3
p=image("gfx/4V/T"..math.random(1, 3)..".bmp",1,0,200+id)

p=image("gfx/4V/CT"..math.random(1, 3)..".bmp",1,0,200+id)

In theory, it should work. But also, don't use one global variable to store images.
edited 1×, last 20.03.12 10:27:43 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview