PDA

View Full Version : warning 202


Hurde
02/03/2012, 05:13 AM
hello im new here im scripting my own gamemode but i got an error/warning and i dont know how to fix can anybody help.

Error:

C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(35) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(36) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(37) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(38) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(39) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(40) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(41) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(42) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(43) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(44) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(57) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(59) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Christiaan\Bureaublad\Gta san server\gamemodes\Hurde.pwn(60) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


13 Warnings.

got an another line with the same warning

code

public OnGameModeInit()
{
AddPlayerClass(0,-1495.3352,920.1175,7.1875,86,999,0,0,0,0);
AddPlayerClass(165,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(166,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(280,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(282,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(286,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(287,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(163,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(164,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);
AddPlayerClass(283,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);

AddStaticVehicle(463,1538.0513,-1694.6932,13.0872,181.3842,11,11);
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, -1495.3352,920.1175,7.1875,86);
SetPlayerFacingAngle(playerid,90.0);
SetPlayerCameraPos(playerid,1504.5505,920.4554,7.1 875,269);
SetPlayerCameraLookAt(playerid,-1495.3352,920.1175,7.1875,86);
return 1;
}

Walsh
02/03/2012, 05:15 AM
Post lines 30-60.

EDIT: Nevermind didn't click on the picture. :P

Make sure your code matches AddPlayerClass (http://wiki.sa-mp.com/wiki/AddPlayerClass) parameters.

From what I see, you're missing one parameter.

Walsh
02/03/2012, 05:22 AM
SetPlayerPos is off it's supposed to be
SetPlayerPos(playerid,Float:x,Float:y,Float:z)
you had one extra parameter.
Same thing with the SetCameraPos and SetPlayerCameraLookAt

Hurde
02/03/2012, 05:24 AM
i have done it exactlty from that page u gave me that gives me only more warnings 22 but ur second post with the (extra) parameter worked got now 13 warnings

Walsh
02/03/2012, 05:26 AM
Well, looking at your pictures, you're either missing or adding parameters.
FYI. Post code and wrap it with [pawn] tags. Makes it hard to proofread code back and forth when it's in attachments.

]Rafaellos[
02/03/2012, 05:43 AM
I think the problem is on AddPlayerClass

The Correct : AddPlayerClass(0,-1670.1058,1303.2300,7.1820,274.4926,0,0,0,0,0,0); // This is an example

Yours:

AddPlayerClass(283,-1495,3352,920,1175.7,1875,86,999,0,0,0,0);


You messed up.

Hurde
02/03/2012, 05:55 AM
TNX it works i learn by every error

]Rafaellos[
02/03/2012, 06:58 AM
Nothing!