new name[MAX_PLAYER_NAME], string{MAX_PLAYER_NAME] problem
#1

i wanna give one person this money based on their name... only problem is that when i put
new name[MAX_PLAYER_NAME], string[MAX_PLAYER_NAME];
at the top of the script with the other new items, it has trouble compiling. (it stops until i end the process... and then i'm left with a WORKING and compiled AMX script)
but if i put that exact line under OnPlayerSpawn with the rest of the code, it says possibly unintended assignment. i dont know wtf to do. i have isolated the problem to the "new name...." line.

here's the rest of the script:
format(personsmoney, sizeof(personsmoney), "/personsmoney.ini");
givemoney = dini_Int(personsmoney, "Money");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(name, MAX_PLAYER_NAME, "%s");
if(name = "the_person") {GivePlayerMoney(playerid, givemoney), dini_IntSet(personsmoney, "Money", 0);}

also i had to be generic here of course i dont want to give away anyone's ID lol
can anyone help me?
Reply


Messages In This Thread
new name[MAX_PLAYER_NAME], string{MAX_PLAYER_NAME] problem - by Yourfatness - 05.10.2010, 20:17
Re: new name[MAX_PLAYER_NAME], string{MAX_PLAYER_NAME] problem - by [XST]O_x - 05.10.2010, 20:30
Re: new name[MAX_PLAYER_NAME], string{MAX_PLAYER_NAME] problem - by Yourfatness - 06.10.2010, 00:28

Forum Jump:


Users browsing this thread: 2 Guest(s)