Weird errors
#1

This error always pops up when I attempt to create a function to apply animations in my own way.

pawn Код:
stock ApplyAnim(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0)//Line 169
{
    SetPVarInt(playerid, "AnimationApplied", 1);
    return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
}
Quote:

E:\Scripting\pawno\include\progress.inc(170) : warning 217: loose indentation
E:\Scripting\pawno\include\progress.inc(172) : warning 217: loose indentation
../src/defines.pwn(169) : error 001: expected token: "-string end-", but found "-identifier-"
../src/defines.pwn(169) : error 010: invalid function or declaration
../src/defines.pwn(169 -- 172) : error 010: invalid function or declaration
../src/defines.pwn(169 -- 172) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Defines.pwn pastebin
Reply
#2

Post the lines 165-169. The error comes from the line above the stock.
Reply
#3

I've added a link to my whole defines.pwn file.
Reply
#4

I can't find anything wrong with it. It's really an odd error. Try adding the stock to your gamemode directly, does it give the same errors again?
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I can't find anything wrong with it. It's really an odd error. Try adding the stock to your gamemode directly, does it give the same errors again?
It'll bring the same error if I add it to the Gamemode, which is why I added it to the defines.pwn and the strange thing is, if I delete the stock, the GM will compile w/o error.
Reply
#6

Even if you use it as definition?
pawn Код:
#define ApplyAnim(%0,%1,%3,%4,%5,%6,%7,%8,%9) \
    SetPVarInt(%0, "AnimationApplied", 1); \
    ApplyAnimation(%0, %1, %2, %3, %4, %5, %6, %7, %8, %9);
Reply
#7

I am not sure but, maybe you could try this and tell us if errors appear:
pawn Код:
stock ApplyAnim(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
{
    SetPVarInt(playerid, "AnimationApplied", 1);
    return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
}
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Even if you use it as definition?
pawn Код:
#define ApplyAnim(%0,%1,%3,%4,%5,%6,%7,%8,%9) \
    SetPVarInt(%0, "AnimationApplied", 1); \
    ApplyAnimation(%0, %1, %2, %3, %4, %5, %6, %7, %8, %9);
Actually, this has fixed it, thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)