Pls Help Me :[
#1

Код:
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
Reply
#2

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..
Reply
#3

maybe someone can correct the error?
Reply
#4

Where did you get that code from ?
Reply
#5

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?
Reply
#6

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...
Reply
#7

I Do Not
Reply
#8

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

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...
Reply
#10

Код:
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.
Reply


Forum Jump:


Users browsing this thread: