Problems Trivia - 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)
+--- Thread: Problems Trivia (
/showthread.php?tid=496428)
Problems Trivia -
Madalyinn - 22.02.2014
pawn Код:
C:\Documents and Settings\Madalin\Desktop\servermeu\gamemodes\FkZ.pwn(3901) : error 017: undefined symbol "Trivia"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Help me ?
Re: Problems Trivia -
ahmedkoki - 22.02.2014
Please post the line
Re: Problems Trivia -
Madalyinn - 22.02.2014
pawn Код:
public TriviaEvent()
{
typet = random(MAX_QUESTIONS);
3901 SendClientMessageToAll ( -1, Trivia [ typet ] [ tIntrebare ] );
endt =1;
timertrivia = SetTimer("TriviaEnd", 360000, false);
return 1;
}
public TriviaEnd()
{
endt = 0;
KillTimer(timertrivia);
return 1;
}
Re: Problems Trivia -
ahmedkoki - 22.02.2014
I can't understand what does this message send?
Re: Problems Trivia -
Madalyinn - 22.02.2014
I do not know, so I took the other server.
Re: Problems Trivia -
ahmedkoki - 22.02.2014
You can just block this comment out and find another trivia
Re: Problems Trivia -
Madalyinn - 22.02.2014
pawn Код:
C:\Documents and Settings\Madalin\Desktop\servermeu\gamemodes\FkZ.pwn(3900) : warning 219: local variable "Trivia" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 14300 bytes
Code size: 2112404 bytes
Data size: 20801152 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:22944240 bytes
1 Warning.
we added:
pawn Код:
public TriviaEvent()
{
3900 new Trivia [ 21 ] [ Trivia_ENUM ];
typet = random(MAX_QUESTIONS);
new string[128];
format(string, sizeof(string), " %s ", Trivia [typet] [tIntrebare]);
SendClientMessageToAll(COLOR_LIGHTRED, string);
endt =1;
timertrivia = SetTimer("TriviaEnd", 360000, false);
return 1;
}
How do I fix warning ?
Re: Problems Trivia -
ahmedkoki - 22.02.2014
Try this
pawn Код:
public TriviaEvent()
{
new iTrivia [ 21 ] [ Trivia_ENUM ];
typet = random(MAX_QUESTIONS);
new string[128];
format(string, sizeof(string), " %s ", iTrivia [typet] [tIntrebare]);
SendClientMessageToAll(COLOR_LIGHTRED, string);
endt =1;
timertrivia = SetTimer("TriviaEnd", 360000, false);
return 1;
}
Re: Problems Trivia -
Madalyinn - 22.02.2014
Resolved! Thanks