just some help on this gm im making
#1

im trying to make my first gm and i type out my first command i want on it and i keep getting this error.
Код:
error 017: undefined symbol "cmd"
Reply
#2

"cmd" is not defined with a "new"-define.
Reply
#3

thought i try that but ok
Reply
#4

Well i have change it into a wraning now.

Код:
warning 219: local variable "cmd" shadows a variable at a preceding level
Reply
#5

Post the part with your code that doesn't work please.
Reply
#6

here

Код:
new cmd[128];

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmd, "/info", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        {
				SendClientMessage(playerid, WHITE, " World Wide RolePlay");
		}
	}
	return 0;
}
Reply
#7

i think one of my } what ever that thing is did not copy sorry.
Reply
#8

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext,"/info",true))    //you forgot the !strcmp, and use boulean true.
	{
		SendClientMessage(playerid, WHITE, " World Wide RolePlay");
	}
	return 0;
}
}
Just do it this way, btw if you use isplayerconnected, you have to use a boulean too, but you are a beginner, so I would start with this.
Reply
#9

you might want to look into sscanf and zcmd if you're starting a new gm
Reply
#10

dude, hes new, let him usa <a_samp>, start easily..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)