Hoe sluit ik deze script? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Nederlands/Dutch (
https://sampforum.blast.hk/forumdisplay.php?fid=31)
+---- Thread: Hoe sluit ik deze script? (
/showthread.php?tid=497007)
Hoe sluit ik deze script? -
NL-Sultan - 24.02.2014
Ik heb nu dit, kan iemand het fixen? Het is een script onder OnDialogResponse, het gaat om de laatste paar lines.
pawn Code:
if(dialogid == DIALOG_TRAIN1) // train dialogresponse trainteleport
{
if(response)
{
switch(listitem)
{
case 0: SetPlayerPos(playerid, -1951.4014, 137.0002, 26.2813); // San Fiero
case 1: SetPlayerPos(playerid, 1434.4467, 2627.6174, 11.3926); // Las Venturas
case 2: SetPlayerPos(playerid, 173.7799, 1248.7538, 22.2805); // Bone County
case 3: SetPlayerPos(playerid, 1434.4467, 2627.6174, 11.3926); // East Los Santos -- teleport not right yet
}
}
}
}
return 1;
}
Het geeft deze error:
Code:
C:\Users\Jan\Desktop\vertical gaming\gamemodes\VG-RP.pwn(28060) : warning 209: function "OnDialogResponse" should return a value
C:\Users\Jan\Desktop\vertical gaming\gamemodes\VG-RP.pwn(28061) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Hoe sluit ik deze script? -
mamorunl - 24.02.2014
Je hebt gewoon een sluitend haakje te veel. Die onder de cases hoort er niet.
+ die allerlaatste hoort t haakje te zijn van je functie.
Re: Hoe sluit ik deze script? -
NL-Sultan - 24.02.2014
pawn Code:
if(dialogid == DIALOG_TRAIN1) // train dialogresponse trainteleport
{
if(response)
{
switch(listitem)
{
case 0: SetPlayerPos(playerid, -1951.4014, 137.0002, 26.2813); // San Fiero
case 1: SetPlayerPos(playerid, 1434.4467, 2627.6174, 11.3926); // Las Venturas
case 2: SetPlayerPos(playerid, 173.7799, 1248.7538, 22.2805); // Bone County
case 3: SetPlayerPos(playerid, 1434.4467, 2627.6174, 11.3926); // East Los Santos -- teleport not right yet
}
}
}
return 1;
}
fixed