How should I fix this?
#1

Quote:

C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(42069) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(42353) : error 017: undefined symbol "UsingTazer"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(42353) : warning 215: expression has no effect
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(42353) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(42353) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(42353) : fatal error 107: too many error messages on one line

Код:
	if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 ||  PlayerInfo[playerid][pMember] == 14)
			{
			    if(IsPlayerInAnyVehicle(playerid))
			    {
			        SendClientMessage(playerid, COLOR_GREY, "   Cannot use this while being in the Car!");
			        return 1;
			    }

			    if(UsingTazer[playerid] == 0)
				{
				    GetPlayerWeaponData(playerid, 2, SaveHandGun[playerid][0],SaveHandGun[playerid][1]);
				    GivePlayerWeapon(playerid, 23, 40);
				    UsingTazer[playerid]=1;
					GetPlayerName(playerid, sendername, sizeof(sendername));
					GiveNameSpace(sendername);
					if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", RandMask[playerid]); }
					format(string, sizeof(string), "* %s unholsters his tazer from his duty belt.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				else
				{
					GetPlayerName(playerid, sendername, sizeof(sendername));
					GivePlayerWeapon(playerid, 24, 0);
					GivePlayerWeapon(playerid, SaveHandGun[playerid][0], SaveHandGun[playerid][1]);
					GiveNameSpace(sendername);
					UsingTazer[playerid]=0;
					if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", RandMask[playerid]); }
					format(string, sizeof(string), "* %s holsters his tazer into his duty belt.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   You are not a Cop!");
			}
		}
	    return 1;
	}
Reply
#2

new UsingTazer[MAX_PLAYERS];

PS: Next time dont copy&paste
Reply
#3

Added it but still not working.
I just wanted a decent tazer system :P
Reply
#4

show the lines where are the errors
Reply
#5

every experienced scripted should know that these errors are caused because your array (UsingTazer) is not defined
Reply
#6

C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 017: undefined symbol "SaveHandGun"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : warning 215: expression has no effect
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : fatal error 107: too many error messages on one

Код:
				    GetPlayerWeaponData(playerid, 2, SaveHandGun[playerid][0],SaveHandGun[playerid][1]);
This is all one line

and sorry admantis that I am still learning.
Thank you to the people that are helping me
Reply
#7

Quote:
Originally Posted by .Com
Посмотреть сообщение
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 017: undefined symbol "SaveHandGun"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : warning 215: expression has no effect
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : fatal error 107: too many error messages on one

Код:
				    GetPlayerWeaponData(playerid, 2, SaveHandGun[playerid][0],SaveHandGun[playerid][1]);
This is all one line

and sorry admantis that I am still learning.
Thank you to the people that are helping me
https://sampwiki.blast.hk/wiki/GetPlayerWeaponData
Are you sure you are using this function correctly?
Reply
#8

Quote:
Originally Posted by .Com
Посмотреть сообщение
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 017: undefined symbol "SaveHandGun"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : warning 215: expression has no effect
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator.ZAP-SERVER\Desktop\Last server\gamemodes\lslrp.pwn(4235 : fatal error 107: too many error messages on one

Код:
				    GetPlayerWeaponData(playerid, 2, SaveHandGun[playerid][0],SaveHandGun[playerid][1]);
This is all one line

and sorry admantis that I am still learning.
Thank you to the people that are helping me
Show me the line where the array SaveHandGun is defined
pawn Код:
new SaveHandGun[MAX_PLAYERS][sizeof(SaveHandGun)];
// or whatever you've got
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)