Warning fixing! Help Please :)
#1

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
Reply
#2

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!
Reply
#3

Код:
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
Reply
#4

Thanks Benjo! Fixed all warnings
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)