please help me
#1

I made this command so you can set your job just with a command

Код:
	else if (strcmp(cmd, "/setjob", true) == 0)
	{
		tmp = strtok(cmdtext,idx);
		if (!strlen(tmp)) return SendClientMessage(playerid,ORANGE,"USAGE: /setjob [1-5]");
		pJob = strval(tmp);
		SendFormatMessage(playerid, WHITE, "SERVER: Your job now is: %d", strval(tmp));
		return 1;
	}
and it gives me this error:

Код:
C:\Users\sant\Documents\SA-MP\Sant Rp\gamemodes\srp.pwn(11231) : error 022: must be lvalue (non-constant)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
How can I fix it?


Reply
#2

Which line gives that error?
Reply
#3

pJob = strval(tmp);
Reply
#4

Anyone knows whats wrong?
Reply
#5

PlayerInfo[playerid][pJob] = strval(tmp);

Since I suppose you are using godfather, lol.
Reply
#6

Quote:
Originally Posted by //exora
PlayerInfo[playerid][pJob] = strval(tmp);

Since I suppose you are using godfather, lol.
Im not using godfather, but I figured it out thanks to you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)