04.08.2009, 09:12
I still don't get how does the arrays works in pawno... As far as i know when we use a string to format some message or something we use %s for string %f for float %i for integer and so on.. But why when i try to print an array it prints me some random unknown symbol instead of the string i assign to the array. It prints me the first and the last letter of the string and also some E which looks like Euro symbol.. But i have maded another print and it prints me the name perfectly. There is a bit of my code:
format(playercar[ucarsn][car_owner],256,"Paranoja");
format(playerhouse[uhousesn][house_owner],256,"Paranoja");
First script works perfectly (it says: |SERVER|: This car belongs to the citizen called NAME.)
Second script prints only the first and the last letters (|SERVER|: This house belongs to the citizen called N Ђ E)
How should I assign the string to the array so that i can print it and to check if it matches the string i specify for example:
It returns me an error, but it would work perfectly on PHP, can any one fully explain how does the arrays works in pawno or give some link or something, thank you.
format(playercar[ucarsn][car_owner],256,"Paranoja");
format(playerhouse[uhousesn][house_owner],256,"Paranoja");
First script works perfectly (it says: |SERVER|: This car belongs to the citizen called NAME.)
Код:
format(ownermessage, sizeof(ownermessage), "|SERVERIS|: Maрina priklauso pilieиiui vardu %s.", playercar[ucarsn][car_owner]); SendClientMessage(playerid,COLOR_SERVER,ownermessage);
Код:
format(ownermessage,sizeof(ownermessage),"|SERVERIS|: Namas priklauso pilieиiui vardu %s.",playerhouse[uhousesn][house_owner]); SendClientMessage(playerid,COLOR_SERVER,ownermessage);
Код:
if (playerhouse[uhousesn][house_owner] == "niekas") {