SA-MP Forums Archive
Pls Help Me :[ - 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: Pls Help Me :[ (/showthread.php?tid=82196)



Pls Help Me :[ - neonas6661 - 16.06.2009

Код:
dcmd_vote(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		if(ServerCFG[VoteInProgress]) return SCM(playerid, B_BILA, "[ 0 ] Voting is already in progress.");
		else if(!strlen(params)) return SCM(playerid, B_BILA, "[ 0 ] USAGE: /vote QUESTION");
		else if(strlen(params) > 128) return SCM(playerid, B_BILA, "[ 0 ] Max. lenght of question is 128 chars.");
	  new string[256];
		format(string,sizeof(string),"[ VOTE ] Player %s started a vote, question: %s , vote is during 1 minute, use /yes /no.", Nick(playerid), params);
		SCMToAll(B_ZLUT,string);
		Timer[T_VoteEnd] = SetTimer("VoteEnd",60000,0);
    ServerCFG[VoteInProgress] = true;
	}
	return 1;
}
ERROR:
Код:
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15227) : error 017: undefined symbol "ServerCFG"
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15227) : error 017: undefined symbol "VoteInProgress"
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15227) : error 029: invalid expression, assumed zero
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15227) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Where is the problem? Pls Help Me


Re: Pls Help Me :[ - Weirdosport - 16.06.2009

My guess is that you've ripped this out of somebody elses script. You can't just copy + paste and expect it to work. Look in the script you borrowed from, and put the arrays/variables in. And ensure you give credit for anybody elses work while you're at it..


Re: Pls Help Me :[ - neonas6661 - 16.06.2009

maybe someone can correct the error?


Re: Pls Help Me :[ - *ToM* - 16.06.2009

Where did you get that code from ?


Re: Pls Help Me :[ - neonas6661 - 16.06.2009

From Here: http://forum.sa-mp.com/index.php?topic=99744.0

This is what is within the error records in this code that does not work?


Re: Pls Help Me :[ - robanswe - 16.06.2009

Quote:
Originally Posted by [_Ozas_
]
Of SA-MP Forum
L.O.L More inte whits script? And copy past all code you have forgotten something!

Search for:

ServerCFG
VoteInProgress

And copy to your script and then you shul get more errors... just post them and i say woot you shuld Search on...


Re: Pls Help Me :[ - neonas6661 - 16.06.2009

I Do Not


Re: Pls Help Me :[ - robanswe - 16.06.2009

Quote:
Originally Posted by [_Ozas_
]
I Do Not
You do not?


Re: Pls Help Me :[ - SiJ - 16.06.2009

Lol... Sorry, but did you read the title of topic where did you copied your code from..
Quote:
Command not working properly second and next times

Now seriously, you need to add these lines:
pawn Код:
new ServerCFG;
new VoteInProgress;
But I think there are still some piece of code missing here..

And what this (in your signature):

means if you even don't know how to fix those errors...


Re: Pls Help Me :[ - neonas6661 - 16.06.2009

Код:
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15240) : error 028: invalid subscript (not an array or too many subscripts): "ServerCFG"
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15240) : warning 215: expression has no effect
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15240) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15240) : error 029: invalid expression, assumed zero
C:\Documents and Settings\namai\Desktop\FeaR'ui\gamemodes\pcrp.pwn(15240) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.