SA-MP Forums Archive
Warning fixing! Help Please :) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Warning fixing! Help Please :) (/showthread.php?tid=262280)



Warning fixing! Help Please :) - FirziKs - 17.06.2011

How to fix these warnings?
Код:
C:\Games\SAMP\LC-RP\gamemodes\LV.pwn(3254) : warning 202: number of arguments does not match definition
C:\Games\SAMP\LC-RP\gamemodes\LV.pwn(9907) : warning 202: number of arguments does not match definition
C:\Games\SAMP\LC-RP\gamemodes\LV.pwn(29293) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Games\SAMP\LC-RP\gamemodes\LV.pwn(29297) : warning 203: symbol is never used: "NameTimer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
Warning lines:
Код:
3254    SetPlayerPos(playerid, 246.8154,124.6496,1003.2188,176.4804);
Код:
9907    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 && PlayerToPoint(5.0, playerid,1726.8085,-1640.2202,20.2241,195.4135))
Код:
29293   public OnPlayerPrivmsg(playerid, recieverid, text[])
Код:
29297   Dont have that line



Re: Warning fixing! Help Please :) - Benjo - 17.06.2011

warning 202: number of arguments does not match definition - This means that you are using a function, and providing too little, or too many arguments for it.

This one has too many:
pawn Код:
3254    SetPlayerPos(playerid, 246.8154,124.6496,1003.2188,176.4804); // SetPlayerPos(playerid,Float:x,Float:y,Float:z)
For the next one, I believe that PlayerToPoint also has too many:
pawn Код:
9907    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 && PlayerToPoint(5.0, playerid,1726.8085,-1640.2202,20.2241,195.4135))
This callback was removed in 0.3, so I assume you have an older script. You may be able to delete it, but then again it might be integral to the scipt:
pawn Код:
29293   public OnPlayerPrivmsg(playerid, recieverid, text[])
The final warning means that a variable/function has been created but not used. Use the search feature to look for NameTimer, to find out whether or not it is being used.

My instinct tells me you are running 0.3+, and you have a script meant for an older version. So that's something to check too!


Re: Warning fixing! Help Please :) - [DDC]Delight - 17.06.2011

Код:
9907    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 && PlayerToPoint(5.0, playerid,1726.8085,-1640.2202,20.2241))
PlayerToPoint only uses X,Y,Z it doesn't need the Angle


Re: Warning fixing! Help Please :) - FirziKs - 17.06.2011

Thanks Benjo! Fixed all warnings