PDA

View Full Version : strange syntax error


Nicknack
12-23-2006, 05:24 PM
i tried to insert the function setspritedirection in in scroll.ppl to have sth. like jumping :)
the code looks like this:
...
if (KeysPressed$[keys.vkRight$])
SetOriginX(OriginX + ScrollSpeed$);
DelSpriteOption(mario$, SO_MIRRORX);
SetSpriteFrames(mario$, 1, 3, -1, false);
end;
if (KeysPressed$[keys.vkUp$])
SetSpriteDirection(mario$ ,90 ,1);
end;
...
if i compile it now i get this error:
error: (c:\programme\ppl\demos\scroll.ppl) [Syntax error at 'SETSPRITEDIRECTION' (58,9)]
error: (c:\programme\ppl\demos\scroll.ppl) [: or , expected at ';' (58,42)]
i don't know if it has a meaning that setspritedirection isn't written in bold type. maybe it isn't seen as a function for any reason.

the same error appears also if i use setspritevelocity or some other functions (don't know which exactly).
there are no differnces between pc and ppc.
so enlighten me i stick in the mud. x)

matteo.m
12-23-2006, 08:19 PM
Hi NickNack, i've been trying your problem but to me it work just fine. I'm using ppl pro 1.11
Did u make other changements to the program?

[br]../../e107_files/public/1166908766_8_FT2475_mario_.jpg[br]

kornalius
12-24-2006, 04:05 PM
Hi Nicknack, are you using the Standard version of PPL?

PPL Standard doesn't have the fancy functions the GameAPI in the Pro version has.

Nicknack
12-25-2006, 08:50 AM
yes i use the std version.
but which are the fancy functions?
and how can i identify them?

kornalius
12-26-2006, 04:03 PM
The fancy functions are in the following categories, sorry I don't have a list of the exact functions, I will have to get back to you on this one:

- Physic functions. (SetSpriteMass()...)
- Velocity functions. (SetSpriteVelocity()...)
- Package functions. (OpenPackage()...)
- More...

I will give you the exact list of functions when I get back to work on January 4th.