SA-MP Forums Archive
Hmm, help please? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hmm, help please? (/showthread.php?tid=196711)



Hmm, help please? - iGetty - 06.12.2010

Код:
if(strcmp(cmd, "/enter", true) == 0)
			if(IsPlayerInRangeOfPoint(playerid, 6,  21,223.1871,  97.6708,  1003.9141))// // put your own cords here
	{
               SetPlayerInterior(playerid, 10);//here aswell, or Set interror here
               TogglePlayerControllable(playerid, 0);

               SetTimer("unfreeze" , false);
               return 1;
	}

	if(GetPVarInt(playerid, "RegistrationStep") >= 5)
Код:
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14513) : error 017: undefined symbol "cmd"
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14514) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14519) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14523) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Please can somebody help?


Re: Hmm, help please? - tony_fitto - 06.12.2010

Use this.

Put this code under OnPlayerCommandText
Код:
cmd = strtok(cmdtext, idx);



Re: Hmm, help please? - iGetty - 06.12.2010

Quote:
Originally Posted by tony_fitto
Посмотреть сообщение
Use this.

Put this code under OnPlayerCommandText
Код:
cmd = strtok(cmdtext, idx);
Do i put it after the first indent or before?


Re: Hmm, help please? - tony_fitto - 06.12.2010

I put mine at the top of the function, Take a look at this screen



Oh yeah I forgot to tell you add "new cmd[256];" you can see on the picture how I have done it.


Re: Hmm, help please? - iGetty - 06.12.2010

Quote:
Originally Posted by tony_fitto
Посмотреть сообщение
I put mine at the top of the function, Take a look at this screen



Oh yeah I forgot to tell you add "new cmd[256];" you can see on the picture how I have done it.
Код:
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14515) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14520) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14524) : warning 217: loose indentation
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14546) : error 021: symbol already defined: "cmd"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Now i get this :S, help me :/


Re: Hmm, help please? - SkizzoTrick - 06.12.2010

Quote:
Originally Posted by getty154
Посмотреть сообщение
Код:
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14515) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14520) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14524) : warning 217: loose indentation
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14546) : error 021: symbol already defined: "cmd"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Now i get this :S, help me :/
Remove the "new cmd[]" thing
It is already defined


Re: Hmm, help please? - iGetty - 06.12.2010

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
Remove the "new cmd[]" thing
It is already defined
Код:
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14513) : error 017: undefined symbol "cmd"
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14519) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14523) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

1 Error.
And now i get this :/


Re: Hmm, help please? - SkizzoTrick - 06.12.2010

Quote:
Originally Posted by getty154
Посмотреть сообщение
Код:
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14513) : error 017: undefined symbol "cmd"
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14519) : warning 202: number of arguments does not match definition
C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14523) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

1 Error.
And now i get this :/
You need to keep only 1 "new cmd[]"
First time you had 2 "new cmd[]" 's
Now you have 0


Re: Hmm, help please? - tentaqueda - 06.12.2010

puts at the beginning of gm:

pawn Код:
new cmd[256];
Quote:

C:\Users\dad\Desktop\Callum's - DON'T DELETE PLEASE!\PR-RP\gamemodes\PR-RP.pwn(14523) : warning 217: loose indentation

fix the line that the mistake is moving it forward or backward by placing it rightly with the commands will top that you'll have at GM


Re: Hmm, help please? - Flo_White - 06.12.2010

the interval is missing at SetTimer