SA-MP Forums Archive
Error pawno - 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: Error pawno (/showthread.php?tid=614123)



Error pawno - DarkElement - 04.08.2016

So, I wanted to put a command "/go", and I have some errors.

This is the script

CMD:go(playerid, params[]) {
if(playerVariables[playerid][pAdminLevel] > 0) {
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}

And there are the errors: http://imgur.com/a/Yhc8g

Can you fix this pls?


Re: Error pawno - AndySedeyn - 04.08.2016

You don't have a variable called 'playerVariables'. It's often preceded by an enum.


Re: Error pawno - DarkElement - 04.08.2016

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
You don't have a variable called 'playerVariables'. It's often preceded by an enum.
So can you fix the script please?


Re: Error pawno - JuzDoiT - 04.08.2016

give me the script maybe i can fix it


Re: Error pawno - WhiteGhost - 04.08.2016

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
You don't have a variable called 'playerVariables'. It's often preceded by an enum.
What he said is true to fix the code something like:

Код:
CMD:go(playerid, params[]) {
if(player[playerid][pAdminLevel] > 0) {
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}



Re: Error pawno - DarkElement - 04.08.2016

Quote:
Originally Posted by WhiteGhost
Посмотреть сообщение
What he said is true to fix the code something like:

Код:
CMD:go(playerid, params[]) {
if(player[playerid][pAdminLevel] > 0) {
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}
I have put the code and it gave me 4 errors, that's the image: http://imgur.com/a/onEw8


Re: Error pawno - JuzDoiT - 04.08.2016

CTRL + F Search pAdminLevel

and show me an pic ,. top of this funcsion..


Re: Error pawno - JuzDoiT - 04.08.2016

try this

Quote:

CMD:go(playerid, params[]) {
if(PlayerInfo[playerid][pAdminLevel] > 0) {
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}

or this

Quote:

CMD:go(playerid, params[]) {
if(pInfo[playerid][pAdminLevel] > 0) {
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}




Re: Error pawno - DarkElement - 04.08.2016

Quote:
Originally Posted by JuzDoiT
Посмотреть сообщение
CTRL + F Search pAdminLevel

and show me an pic ,. top of this funcsion..
It sais search not found.


Re: Error pawno - JuzDoiT - 04.08.2016

alright .. check private message i pm you