25.01.2016, 17:56
Hello well i just used a timer and i came across a bug that i havent before, I put "freeze" as one of my functions and it says it doesn't exist if there is a samp wiki page listing all the functions they have that would be appreciated, Here is the script i was working on:
As you can see i am making a script were once you enter a interior you get frozen for some time to avoid falling then you get unfrozen in about 1000 milliseconds (According to my timer.)
Here is the opcode i receive:
In my server.cfg file it says there is no gamemode.
Код:
forward freeze(); public OnPlayerCommandText(playerid,cmdtext[]) { if(!strcmp(cmdtext, "/kill", true)) { new Float:x, Float:y, Float:z; SetPlayerHealth(playerid, 0); GetPlayerPos(playerid, x, y, z); return 1; } if(!strcmp(cmdtext, "/shop", true)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Shop", "Weapons\nArmor\nDrugs(V.I.P)", "Select", "Cancel"); return 1; } if (!strcmp("/enter", cmdtext)) { if (IsPlayerInRangeOfPoint(playerid, 7.0, 9634.5996, 5616.8052, 4.7742 )) { SetPlayerPos(playerid, 2233.8032, 1712.2303, 1011.7632); { TogglePlayerControllable(playerid, 0); SetTimer("freeze", 1000, false); } public freeze() { TogglePlayerControllable(playerid, 1); } } return 1; }
Here is the opcode i receive:
Код:
C:\Users\User\Desktop\LSRP\gamemodes\new.pwn(338) : warning 217: loose indentation C:\Users\User\Desktop\LSRP\gamemodes\new.pwn(343) : warning 217: loose indentation C:\Users\User\Desktop\LSRP\gamemodes\new.pwn(343) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\LSRP\gamemodes\new.pwn(343) : error 004: function "freeze" is not implemented C:\Users\User\Desktop\LSRP\gamemodes\new.pwn(344) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.