I need some help:
#1

Код:
39:  |forward SetScore();
40:  |public SetScore()
41:  |{
42:  |for(new i=0;i<MAX_PLAYERS;i++)
43:  |  {
44:  |      Score[i]=GetPlayerMoney(i);
45:  |      SetPlayerScore(i, Score[i]);
46:  |  }
47:  |  return 1;
48:  |}
49:  |myfunc()
50:  |{
51:  |  return 1;
52:  |}
^^^This is after main()^^^

Pawno Errors:
Код:
C:\Users\user\Desktop\SAMP SERVER STUFF\samp server\pawno\new.pwn(44) : error 017: undefined symbol "Score"
C:\Users\user\Desktop\SAMP SERVER STUFF\samp server\pawno\new.pwn(44) : warning 215: expression has no effect
C:\Users\user\Desktop\SAMP SERVER STUFF\samp server\pawno\new.pwn(44) : error 001: expected token: ";", but found "]"
C:\Users\user\Desktop\SAMP SERVER STUFF\samp server\pawno\new.pwn(44) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\SAMP SERVER STUFF\samp server\pawno\new.pwn(44) : fatal error 107: too many error messages on one line
Reply
#2

forward SetScore();

Put that just before the public.
Reply
#3

That got the line 40 error message away. I still have that^^^^
Reply
#4

Define the score.

#Define
Reply
#5

Why have a timer for this? Just set their cash and score at the same time.
Reply
#6

defining it did not do anything
Reply
#7

Quote:
Originally Posted by MP2
Посмотреть сообщение
Why have a timer for this? Just set their cash and score at the same time.
Could you show me how?
Reply
#8

I'v messed around a bit and this is what i have now:
Код:
40:  |public SetScore()
41:  |{
42:  |	{
43:  |      SetPlayerScore(playerid, 5);
44:  |	}
45:  |	return 1;
46:  |}
Error:

Код:
C:\Users\user\Desktop\SAMP SERVER STUFF\samp server\pawno\new.pwn(43) : error 017: undefined symbol "playerid"
Reply
#9

Why do you want their score to be the same as their cash?
Reply
#10

Quote:
Originally Posted by [GOD]Dragonster82
Посмотреть сообщение
Define the score.

#Define
Macros aren't arrays, you simply define the name and declare a constant.

Код:
error 017: undefined symbol "Score"
The compiler's is unaware of what 'Score' is, therefore you will receive that it is undefined. I'm assuming since it is a looping instruction given that some functions will apply, you must initialize 'Score' as MAX_PLAYERS.

pawn Код:
new Score[MAX_PLAYERS];
Declare this globally, outside of any functions or callbacks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)