Page 1 of 1

I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 5:03 pm
by jimsta
i coppied and past it in a new map.

I've made the variables:
Steer Real
Terrainkill Integer
H Unitgroup
Slide Integer

still it gives this errors:
Line 35: Expected a name call SetUnitX(u,x+udg_Speed*Cos(0.017453278*GetUnitFacing(u)))
Line 36: Expected a name call SetUnitY(u,y+udg_Speed*Sin(0.017453278*GetUnitFacing(u)))
Line 45: Expected a name elseif(t==udg_TerrainKill)and(GetUnitState(u,UNIT_STATE_LIFE)>0)then
Line 49: Expected "endif" endif

the steer trigger hasn't have any problems .

the demo map itself hasn't have any problems with the "slide" trigger

Greetz, jimsta

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 5:06 pm
by 3ICE
Hi,

That is a very interesting problem you have there.

Please attach the map.

--3ICE

Edit: Never mind, no need. I figured it out.
You simply misnamed the variables. Compare:
TerrainKill (correct, capital K)
Terrainkill (incorrect, lowercase k)
Speed (correct, required variable)
Steer (incorrect, no such variable is used by my system)

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 6:50 pm
by jimsta
thank you 3ice!

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 9:14 pm
by jimsta
sadly, i copied and tried again (little later) it still gives the 2 errors with "expected a name" ...
greetz, jimsta

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 9:18 pm
by 3ICE
Well, make sure your variable names are correct.

Computers are not like humans. For example; I can guess when you write "coppied and past" that you actually mean "copied and pasted", but a computer would not. Hence, "expected a name".
Variable names are also case sensitive.

Edit: "expected a name" means: A variable the erroneous code is trying to use was not defined (created) with that name.

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 9:33 pm
by jimsta
yeah, but i really checked the names of the variables and there right and what variable name should be in here :

call SetUnitX(u,x+udg_Speed*Cos(0.017453278*GetUnitFacing(u)))

call SetUnitY(u,y+udg_Speed*Sin(0.017453278*GetUnitFacing(u)))

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 9:35 pm
by 3ICE
Make sure the variable name is Speed. Not udg_Speed, not speed, not Sped, etc.

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 9:38 pm
by jimsta
srry, never mind i'm stupid --'

i did steer instead of speed thats why i didn't saw a variable in it .

please excuse me for wasting your'e time .

Re: I copy and past the trigger "3ICE's Sliding Trigger" errors

Posted: Tue Feb 07, 2012 9:46 pm
by 3ICE
It's okay. I'm glad there are still people who use my sliding system. Post your map when it's done or if you get stuck doing something. 3ICE's Map Vault