Script help With "APlayerData"
#1

Hey Sup Guys and Girls
ok So I've had to Restart my Server Script because i lost a code and couldn't find it so i've Start it again and i Finished it Just 2 minutes ago but i Finished the Outline of it now im working on Adding Commands,Class's,Jobs for the Class's.

Anyway back on topic.

i Add a /Rule Command and then the Rules but then i added a Code for the Script for when a player Doesn't Agree with my Server Rules they get a Message Saying "You haven't accepted the /rules yet"

So heres the Code:
Код:
code line97 }	  if(APlayerData[playerid][RulesRead] == false)
code line 98               SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");
code line 99}
just to let you's know Code line 97 is the problem.
(97) : error 017: undefined symbol "APlayerData"
(97) : warning 215: expression has no effect
(97) : error 001: expected token: ";", but found "]"
(97) : error 029: invalid expression, assumed zero
(97) : fatal error 107: too many error messages on one line

I'm not sure how to Fix it I've look on ******,All over the SA-MP Forum Website
So if anyone Can help i would Really Appreciate it.
Reply
#2

Did you declare the array?
Reply
#3

Don't think So
I'll have a look
Reply
#4

yea I'm not that great at Declareing array's
could you help me.
Reply
#5

Up the top of your script, preferably underneath your defines/forwards
You need to declare the array like this:

pawn Код:
enum pInfo
{
    RulesRead,
    <insert your info here>,
    <insert your info here>,
    <insert your info here>,
};
new APlayerInfo[MAX_PLAYERS][pInfo];
Where I've written <insert your info here> you declare other members of the array.
They may be PlayerLevel, ConnectTime, Kills, Deaths etc.

You then will need to create a method for saving that information externally.
Do you intend to use a filesystem? or MySQL?
Reply
#6

thanks Rob_Maate
I'll try that right now

and
Quote:

You then will need to create a method for saving that information externally.
Do you intend to use a filesystem? or MySQL?

not sure yet
Reply
#7

Aiight well just give that a go, all variables will only be saved until you close the server tho.

When you decide what method of data storage your gonna use, I can help you set that up
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)