Problem with converting
#1

I finish my gamemode and when i try to convert it it show me this error

Код:
C:\Users\Vlada\Desktop\UGRPG.pwn(1633) : error 020: invalid symbol name ""
C:\Users\Vlada\Desktop\UGRPG.pwn(1633) : error 010: invalid function or declaration
C:\Users\Vlada\Desktop\UGRPG.pwn(6311) : warning 219: local variable "plname" shadows a variable at a preceding level
C:\Users\Vlada\Desktop\UGRPG.pwn(6312) : warning 219: local variable "playersip" shadows a variable at a preceding level
C:\Users\Vlada\Desktop\UGRPG.pwn(6339) : warning 217: loose indentation
C:\Users\Vlada\Desktop\UGRPG.pwn(6339) : error 029: invalid expression, assumed zero
C:\Users\Vlada\Desktop\UGRPG.pwn(6339) : error 035: argument type mismatch (argument 1)
C:\Users\Vlada\Desktop\UGRPG.pwn(6339) : error 020: invalid symbol name ""
C:\Users\Vlada\Desktop\UGRPG.pwn(6339) : fatal error 107: too many error messages on one line
i find that lines and everything is all right i don't know why is this happening

1633
Код:
new cDebug;
6311-6312
Код:
public OnPlayerDisconnect(playerid, reason)
{
	new textreason[64];
	new plname[128];                                             <---6311
	new playersip[128];                                           <---6312
	GetPlayerName(playerid, plname, sizeof(plname));
	GetPlayerIp(playerid, playersip, sizeof(playersip));
	SafeResetPlayerWeapons(playerid);
6339
Код:
	if(playerid == beingvoted && reason != 2)
	{
	    KillTimer(votetimer1);
	    KillTimer(votetimer2);

6339--->    format(string2,sizeof(string2),"[Glasanje]: %s (%d) se izlogovao, glasanje je zavrseno!",plname,playerid);
	    SendClientMessageToAll(TEAM_GROVE_COLOR,string2);
        votetimer1 = SetTimer("ResetVotation",300000,false);
	}
Reply
#2

actully what are you trying to do ? if you get player ip on disconnect it will show as null becoz i tried that same :P i never had any idea so when i searched for it and you should too.! remember that playername maxsize is 24 why did you puted 128 ?
wrong
Код:
	new plname[128];                                             <---6311
	new playersip[128];                                           <---6312
correct

Код:
	new plname[24];                                             <---6311
	new playersip[16];                                           <---6312
Reply
#3

Nope again, i try to put every number but it won't ;(
Reply
#4

try this

pawn Код:
if(playerid == beingvoted)
Reply
#5

Show some more of your code. I mean things after and before the error lines.
Reply
#6

Thanks it works but what with others?
Here is half of the lines

Код:
public OnPlayerDisconnect(playerid, reason)
{
	new textreason[64];
	new plname[24];
	new playersip[16];
	GetPlayerName(playerid, plname, sizeof(plname));
	GetPlayerIp(playerid, playersip, sizeof(playersip));
	SafeResetPlayerWeapons(playerid);
	if(PlayerInfo[playerid][pAdminDuty] == 1)
	{
		SafeResetPlayerWeapons(playerid);
	}
	if(Searching[playerid] == 1)
	{
		RemovePlayerMapIcon(playerid, 500 + playerid);
		Searching[playerid] = 0;
	}
	if(Ronned[playerid] >= 1)
	{
	    KillTimer(RonnTimer[playerid]);
	}
	if(PlayerCuffed[playerid])
	{
	    KillTimer(cufftimer[playerid]);
	}

 if(playerid == beingvoted)
	{
	    KillTimer(votetimer1);
	    KillTimer(votetimer2);

            format(string2,sizeof(string2),"[Glasanje]: %s (%d) se izlogovao, glasanje je zavrseno!",plname,playerid);
	    SendClientMessageToAll(TEAM_GROVE_COLOR,string2);
            votetimer1 = SetTimer("ResetVotation",300000,false);
	}
	if(PlayerCuffed[playerid] > 0)
	{
	    KillTimer(cufftimer[playerid]);
	}

	if(Tazer[playerid] == 1) { SafeGivePlayerWeapon(playerid, 24, PreTazerAmmo[playerid]); }
	Delete3DTextLabel(DutyLabel[playerid]);
	Delete3DTextLabel(AfkLabel[playerid]);
	gActivePlayers[playerid]--;
	numplayers--;
	RemovePlayerMapIcon(playerid, 37 + playerid);
	TextDrawDestroy(Textdraw64[playerid]);
	TextDrawDestroy(Textdraw54[playerid]);
	TextDrawDestroy(Textdraw53[playerid]);
	TextDrawDestroy(Textdraw52[playerid]);
	TextDrawDestroy(Textdraw51[playerid]);
	TextDrawDestroy(Textdraw49[playerid]);
	TextDrawDestroy(Textdraw42[playerid]);
	TextDrawDestroy(Textdraw41[playerid]);
	TextDrawDestroy(Textdraw40[playerid]);
	TextDrawDestroy(Textdraw39[playerid]);
	TextDrawDestroy(Textdraw1[playerid]);
	KillTimer(TrainTimer[playerid]);
	KillTimer(MoneyTimer[playerid]);
	if(IsPlayerInEVehicle[playerid] != 9999)
	{
	    new i = IsPlayerInEVehicle[playerid];
		Seats[i] --;
	}
	new string[24];
	new d,m,y,h,mi,s;
	getdate(y,m,d);
	gettime(h,mi,s);
	format(string, sizeof(string), "%d/%d/%d at %d:%d:%d",d,m,y,h,mi,s);
	strmid(PlayerInfo[playerid][pLastSeen], string, 0, strlen(string), 255);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)