New Problem
#1

Delete
Reply
#2

Any help?
Reply
#3

Put PreloadAnimLib(playerid,"FOOD"); OnPlayerSpawn?
Reply
#4

PHP код:
/*FOR LINE 7411:*/ warning 239literal array/string passed to a non-const parameter 
When defining strings, use const

PHP код:
static const Strig[256]; 
Reply
#5

Nope. That just gave me more errors and warnings.
Reply
#6

how about trying to do this?
PHP код:
new string[5]; // example holder for FOOD with 4 chars
memcpy(string"FOOD"05*45);
PreloadAnimLib(playeridstring); 
I don't know if it works though... just a guess
Reply
#7

No, the error is, that you have to use const in the function header:

PHP код:
stock PreloadAnimLib(playerid, const animlib[]) ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0); 
That would fix the issue.

But i recommend you to use a macro:

PHP код:
#define PreloadAnimLib(%0,%1) ApplyAnimation(%0,%1,"null",0.0,0,0,0,0,0) 
Reply
#8

Quote:
Originally Posted by JesterlJoker
Посмотреть сообщение
how about trying to do this?
PHP код:
new string[5]; // example holder for FOOD with 4 chars
memcpy(string"FOOD"05*45);
PreloadAnimLib(playeridstring); 
I don't know if it works though... just a guess
Nope. Won't work.

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
No, the error is, that you have to use const in the function header:

PHP код:
stock PreloadAnimLib(playerid, const animlib[]) ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0); 
That would fix the issue.

But i recommend you to use a macro:

PHP код:
#define PreloadAnimLib(%0,%1) ApplyAnimation(%0,%1,"null",0.0,0,0,0,0,0) 
I tried you first but as I said, just gave me more errors. I will try second option. Maybe it will work.
Reply
#9

Just tested that second thing with macro. Thanks. It works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)