12.01.2020, 17:16
I have a problem compiling my code:
Geting this error:
Code:
public OnPlayerSpawn(playerid) { new WQ[256]; mysql_format(Database, WQ, sizeof(WQ), "SELECT `WEAPONID`, `AMMO` FROM `WEAPONDATA` WHERE `ID` = '%d'", pInfo[playerid][ID]); mysql_tquery(Database, WQ, "OnLoadPlayerWeapons", "ii", playerid); return 1; } forward public OnLoadPlayerWeapons(playerid); public OnLoadPlayerWeapons(playerid) { for(new i, j = cache_get_row_count(WQ); i < j; i++) // loop through all the rows that were found { weaponid = cache_get_row_int(i, 0, WQ); ammo = cache_get_row_int(i, 1, WQ); if(!(0 <= weaponid <= 46)) // check if weapon is valid (should be) { printf("[info] Warning: OnLoadPlayerWeapons - Unknown weaponid '%d'. Skipping.", weaponid); continue; } GivePlayerWeapon(playerid, weaponid, ammo); } return; }
PHP Code:
E:\Projektai\SAMP\Win servas prog\gamemodes\naujas.pwn(550) : error 017: undefined symbol "WQ"
E:\Projektai\SAMP\Win servas prog\gamemodes\naujas.pwn(552) : error 017: undefined symbol "cache_get_row_int"
E:\Projektai\SAMP\Win servas prog\gamemodes\naujas.pwn(553) : error 017: undefined symbol "cache_get_row_int"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.