Pawno two errors
#1

Код:
C:\Documents and Settings\Administrator\Desktop\gtaaaa\gamemodes\larp.pwn(6343) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\gtaaaa\gamemodes\larp.pwn(6343) : error 001: expected token: ";", but found "if"
Код:
	SendAdminMessage(COLOR_GREEN, string2);
	}
	else if(reason == 1)
	{
		textreason = "Leaving";
Please help me.Thanks
Reply
#2

Show us the proper code please and comment the line where you get the error/warning.
Reply
#3

Код:
{
	    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);
	{
		textreason = "Crashed";
		strmid(PlayerInfo[playerid][pWhyLeft], "Crashed", 0, strlen("Crashed"), 255);
		format(string2, sizeof(string2),"[INFO]: %sВлезе/Излезе Излезна от Bulgarian Roleplay.[%s]",plname, textreason);
   		SendAdminMessage(COLOR_GREEN, string2);
	}
	else if(reason == 1)
	{
		textreason = "Leaving";
		strmid(PlayerInfo[playerid][pWhyLeft], "Leaving", 0, strlen("Leaving"), 255);
		format(string2, sizeof(string2),"[INFO]: %sВлезе/Излезе Излезна от Bulgarian Roleplay.[%s]",plname, textreason);
   		SendAdminMessage(COLOR_GREEN, string2);
	}
	else if(reason == 2)
	{
		strmid(PlayerInfo[playerid][pWhyLeft], "Kicked/Banned", 0, strlen("Kicked/Banned"), 255);
	}
	SaveGuns(playerid);
	OnPlayerUpdateEx(playerid);
	if(OfficerCourseStep[playerid] != 255)
	{
THIS IS THE LINE
Reply
#4

This is the whole code bro. Im talking about only one line. CTRL + G in your game mode. Enter "6343" and copy , paste it here.
Reply
#5

Код:
	else if(reason == 1)
Reply
#6

You can't set a sting into a variable just with "=". You have to use format.
And there's also an error that you forgot to put ";", so check where .
Reply
#7

how to become
Reply
#8

Change else if to "if"
Reply
#9

Working,Thanks Funeral + rep
Reply
#10

Quote:
Originally Posted by Verbal
Посмотреть сообщение
You can't set a sting into a variable just with "=". You have to use format.
And there's also an error that you forgot to put ";", so check where .
Holy Fuck. Weed's killing my brain cells? I didnt see that. And i really dont think changing else if to if might compile but i think it will not work fine when you will run the server. You should use format function for a string.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)