Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Error on weapon-config.inc

 
  • 0 Vote(s) - 0 Average
Pawn Error on weapon-config.inc
DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#1
2020-10-16, 04:33 PM
Hello 
i want use the include weapon config to make a damage informer but i get this error: 

Quote:weapon-config.inc(1589) : error 035: argument type mismatch (argument 2)

how to fix it please ?
Kwarde
Offline

Burgershot Member
Posts: 99
Threads: 2
Joined: Sep 2020
Reputation: 8
Location: The Netherlands
#2
2020-10-16, 04:38 PM
argument type mismatch means, well, that the argument type mismatched :P
Example of an argument mismatch:

Code:
Foo(a, b);
main() printf("%d", Foo(1, "2"));
As you can see, Foo() expects the second argument to be a tagless integer. I used a string ("2" rather than 2). This will result in the error you've shown.

Check that line in weapon-config.inc and check the second argument, and then check the function it's mismatched in to see what it's supposed to be.
Might be you did something wrong too (since most people don't have that issue with weapon-config.inc).
DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#3
2020-10-16, 04:50 PM
AH okey :D but how can i find the line of problem exactly on INCLUDE
Because i don't think the error message give the line when i open inc and searching line (1589) i get this : return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync); so i don't think problem is on this line
Kwarde
Offline

Burgershot Member
Posts: 99
Threads: 2
Joined: Sep 2020
Reputation: 8
Location: The Netherlands
#4
2020-10-17, 09:04 PM
The declaration of that native function in a_players.inc is:
Code:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
Is it possible that the arguments in that function inside weapon-config.inc are using constant arguments? (eg. const animlib[] and const animname[])? If so that very well might be the issue.
DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#5
2020-10-21, 11:09 AM (This post was last modified: 2020-10-21, 11:48 AM by DaZzY.)
Yes they are constant
Quote:stock WC_ApplyAnimation(playerid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0)
{
if (playerid < 0 || playerid >= MAX_PLAYERS || s_IsDying[playerid]) {
return 0;
}

return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
}

DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#6
2020-10-21, 01:02 PM
UP :D
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#7
2020-10-21, 10:09 PM
Use sampctl or manually download samp-stdlib and pawn-stdlib from pawn-lang github!
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
Grate Maharlika
Offline

Burgershot Member
Posts: 18
Threads: 7
Joined: Oct 2020
Reputation: 0
#8
2020-10-22, 09:16 AM
(2020-10-21, 10:09 PM)Pinch Wrote: Use sampctl or manually download samp-stdlib and pawn-stdlib from pawn-lang github!

Maybe u can help me here please?
https://burgershot.gg/showthread.php?tid=1263
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode