error 001: expected token: "{"
#1

Код:
C:\Users\ii\Desktop\roleplay.pwn(29307) : error 001: expected token: "{", but found "-identifier-"
Код:
Dialog:Origin(playerid, response, listitem, inputtext[])
{
	if (response)
	{
	    new str[64];

	    if (isnull(inputtext) || strlen(inputtext) > 32) {
	        Dialog_Show(playerid, Origin, DIALOG_STYLE_INPUT, "Origin", "Please enter the geographical origin of your character below:", "Submit", "Cancel");
		}
		else for (new i = 0, len = strlen(inputtext); i != len; i ++) {
		    if ((inputtext[i] >= 'A' && inputtext[i] <= 'Z') || (inputtext[i] >= 'a' && inputtext[i] <= 'z') || (inputtext[i] >= '0' && inputtext[i] <= '9') || (inputtext[i] == ' ') || (inputtext[i] == ',') || (inputtext[i] == '.'))
				continue;

			else return Dialog_Show(playerid, Origin, DIALOG_STYLE_INPUT, "Origin", "Error: Only letters and numbers are accepted in the origin.\n\nPlease enter the geographical origin of your character below:", "Submit", "Cancel");
		}
		format(PlayerData[playerid][pOrigin], 32, inputtext);
        switch (PlayerData[playerid][pGender])
       	ShowModelSelectionMenu(playerid, "Select Skin", MODEL_SELECTION_SKIN, g_aMaleSkins, sizeof(g_aMaleSkins), -16.0, 0.0, -55.0);
		ShowModelSelectionMenu(playerid, "Select Skin", MODEL_SELECTION_SKIN, g_aFemaleSkins, sizeof(g_aFemaleSkins), -16.0, 0.0, -55.0);
  		format(str, sizeof(str), "~r~Origin:~w~ %s", inputtext);
  		PlayerTextDrawSetString(playerid, PlayerData[playerid][pTextdraws][17], str);
	}
	return 1;
}
Reply
#2

which line?
Reply
#3

indicate the line of the error ...
Reply
#4

Код:
format(PlayerData[playerid][pOrigin], 32, inputtext);
switch (PlayerData[playerid][pGender])
ShowModelSelectionMenu(playerid, "Select Skin", MODEL_SELECTION_SKIN, g_aMaleSkins, sizeof(g_aMaleSkins), -16.0, 0.0, -55.0);
The highlighted line makes no sense in that context.
You can read more about how to use switch in the documentation. https://sampwiki.blast.hk/wiki/Switch#switch
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)