26.04.2014, 21:18
Hello, i'm trying to make a teleport dialog with more dialogs appearing out of it too.
I've only included up to dialog 65 as I only wanted to add the teleports to that for now.
Errors after compiling:
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(455) : error 002: only a single statement (or expression) can follow each "case"
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(455 -- 456) : error 029: invalid expression, assumed zero
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(464) : warning 217: loose indentation
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(466) : warning 217: loose indentation
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(466) : error 029: invalid expression, assumed zero
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(466) : error 004: function "OnPlayerClickPlayer" is not implemented
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(470) : error 030: compound statement not closed at the end of file (started at line 457)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Код:
if (strcmp("/t", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, DIALOG_TELEPORTS, 2, "{0099CC}Teleports", "Stunts\nHotspots\nInteriors\nHouses\nCities", "OK", "Cancel"); return 1; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_TELEPORTS) { switch(listitem) { case 0: { ShowPlayerDialog(playerid, 65, 2, "Stunts", "Abandoned Farm\nSan Fierro Beach\nLas Venturas Airport", "OK", "Cancel"); } case 1: { ShowPlayerDialog(playerid, 66, 2, "Hotspots", "Abandoned Farm\nSan Fierro Beach\nLas Venturas Airport", "OK", "Cancel"); } case 2: { ShowPlayerDialog(playerid, 67, 2, "Interiors", "A\nA\nA", "OK", "Cancel"); } case 3: { ShowPlayerDialog(playerid, 65, 2, "Houses", "CJ's House(/cj)\nSan Fierro Beach\nLas Venturas Airport", "OK", "Cancel"); } case 4: { ShowPlayerDialog(playerid, 65, 2, "Cities", "Los Santos\nSan Fierro\nLas Venturas\nLiberty City\nEl Quebrados", "OK", "Cancel"); } if(dialogid == 65) { if(response) { GameTextForPlayer(playerid, "~g~Abandoned Farm~n~~w~/af", 6000, 3); SetPlayerPos(playerid,-45.9522,-13.4273,5.6389); SetPlayerFacingAngle(playerid,245); SetPlayerInterior(playerid,0); return 1; }
Errors after compiling:
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(455) : error 002: only a single statement (or expression) can follow each "case"
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(455 -- 456) : error 029: invalid expression, assumed zero
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(464) : warning 217: loose indentation
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(466) : warning 217: loose indentation
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(466) : error 029: invalid expression, assumed zero
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(466) : error 004: function "OnPlayerClickPlayer" is not implemented
E:\Program Files\GTA San Andreas\Server\gamemodes\Gamemode.pwn(470) : error 030: compound statement not closed at the end of file (started at line 457)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.