Convert a animations fs(0.3a->0.3b)
#1

Versions before 0.3b, ApplyAnimation command looks like this
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time)
But in 0.3b
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
I compiled the animation fs for 0.3b
But animations cannot be synced as they only showed on the client of the player who typed the animation command
So, I tried to edit the animation fs to make animations synced
The original one(a part of it)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1);
}
And I changed it into(a part of it)(adding ,1)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1,1);
}
But when I compile it, I got warnings on each line I've edited
Warnings(a part on it)
Код:
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(127) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(129) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(133) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(135) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(137) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(139) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(141) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(143) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(145) : warning 202: number of arguments does not match definition
What's the problem@@
Reply
#2

Can anyone help me? The post is sinking....
Reply
#3

I belive you dont need to add the last part, I never did that on my server and it's working good as i know for the moment.

-Try to use the script as you did in 0.3a If it works perfect there are nothing for you to fare.
Reply
#4

Quote:
Originally Posted by tony_fitto
Посмотреть сообщение
I belive you dont need to add the last part, I never did that on my server and it's working good as i know for the moment.

-Try to use the script as you did in 0.3a If it works perfect there are nothing for you to fare.
The animations won't sync with others but only showed on the client of the player who used the animation command.
Reply
#5

did you update your include files that corresponds to 0.3b?
maybe associated pawno still refers 0.3a includes.
Reply
#6

I use 0.3b includes that come with 0.3b pawno
Reply
#7

Quote:
Originally Posted by kevinchui828
Посмотреть сообщение
I use 0.3b includes that come with 0.3b pawno
yes and the number of arguments does not match the definition

ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);

ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1 ,1,1,1,1);

ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1 ,1,1,1,1,1);

I don't know why your previous script compiled in 0.3a but you don't need to add the last argument.
Reply
#8

Quote:
Originally Posted by kevinchui828
Посмотреть сообщение
Versions before 0.3b, ApplyAnimation command looks like this
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time)
But in 0.3b
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
I compiled the animation fs for 0.3b
But animations cannot be synced as they only showed on the client of the player who typed the animation command
So, I tried to edit the animation fs to make animations synced
The original one(a part of it)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1);
}
And I changed it into(a part of it)(adding ,1)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1,1);
}
But when I compile it, I got warnings on each line I've edited
Warnings(a part on it)
Код:
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(127) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(129) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(133) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(135) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(137) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(139) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(141) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(143) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(145) : warning 202: number of arguments does not match definition
What's the problem@@
Open up the include named a_players.inc in your pawno directory and find for "ApplyAnimation" (without quotes)
After this edit this line:
Код:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
to this:
Код:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 1);
and after this recompile your FS or gamemode...It should be work without warnings
Credits to: Jacob74
Reply
#9

Still doesn't work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)