Raised This Month: $32 Target: $400
 8% 

help Me To Fix My Store Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FoxyTheDeveloper
Junior Member
Join Date: Jun 2020
Old 06-03-2020 , 08:24   help Me To Fix My Store Plugin
Reply With Quote #1

Please If You Know How To fix So please send me the fixed code in PM

Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

static String:kvfile[PLATFORM_MAX_PATH];
static String:Items[200][3][200];

public Plugin:myinfo = {
name = "Store Plugin"
author = "Foxy and Eyal282"
description = ""
url = ""
};

public OnPluginStart()
{
    CreateDirectory("/addons/sourcemod/Configs/StorePlugin");
    BuildPath(Path_SM, kvfile, sizeof(kvfile), "Configs/StorePlugin/items.txt");
    RegAdminCmd("sm_loaditems", commandloaditems, ADMFLAG_ROOT, "");
    RegConsoleCmd("sm_showitems", commandshowitems, "");
    
    loadItems();
}

public itemsmenuhandle(Handle:menu, MenuAction:action, client, itempos)
{
	if(action == MenuAction_Select)
	{
		new String:item[6];
		GetMenuItem(menu, itempos, item, sizeof(item));
		
		if(SpawnEntity(StringToInt(item)));
		{
			
        } else {
        	
        }
        
        
    } else if(action == MenuAction_End) {
        CloseHandle(manu);
    }
}

public bool:SpawnEntity(itemid)
{
	new ent = CreateEntityByName("prop_dynamic");
	
	if(ent != -1 && DispatchSpawn(ent) && IsVaildEntity(ent))
	{
	DispatchKeyValue(ent, "model", value);
    }
    
    
	
}

public Action:commandshowitems(client, args)
{
	new Handle:menuhandle = CreateMenu(itemsmenuhandle);
	SetMenuTitle(menuhandle, "Welcome To The Store\nYour Credits: %d\nInfo:\nName - Price", Credits[client]);
	
	new String:buffer[250], String:itemindex[6];
	
	for(new i = 0, i < sizeof(items), i++)
	{
		if(StrEqual(items[i][0], ""))
		{
			Format(buffer, sizeof(buffer), "%s - %s", Items[i][0], Items[i][1]);
			Format(buffer, sizeof(itemindex), "%d", i);
			AddMenuItem(menuhandle, itemindex, buffer);
        }
    }
    SetMenuPagination(menuhandle, 8);
    SetMenuExitButton(menuhandle, false);
    CloseHandle(menuhandle);
	return  Plugin_Handled
}

public Action:commandloaditems(client, args) 
{
	loadItems();
	return Plugin_Handled
}

public loadItems()
{
    new Handle:db = CreateKeyValues("Itemlist");
    FileToKeyValues(db, kvfile);
    
    if(KvJumpToKey(db, "Items", false))
    {
        new String:index[6];
        for (new i = 0; i < sizeof(items);i++)
        {
        	Format(index, sizeof(index), "%d", i);
        	
        	KvGetString(db, index, buffer, sizeofbuffer, "NULLSTRING");
        	
              if(buffer[0] != EOS)
        	{
        		decl String:tempstring[2][200]
        		
        		ExplodeString(buffer, "--", tempstring, 3, 200)
        		
        		Items[i][0] = tempstring[0];
        		Items[i][1] = tempstring[1];
        		Items[i][1] = tempstring[2];
            } else {
            	if(mode == 1)
            	{
            
                }
               }
        }
        return true;
    }
    else
        return false;
    CloseHandle(db);
}
FoxyTheDeveloper is offline
mrtn
Junior Member
Join Date: May 2020
Old 06-03-2020 , 09:04   Re: help Me To Fix My Store Plugin
Reply With Quote #2

How can we fix it if we do not know what is wrong?
mrtn is offline
FoxyTheDeveloper
Junior Member
Join Date: Jun 2020
Old 06-03-2020 , 09:06   Re: help Me To Fix My Store Plugin
Reply With Quote #3

this is my compile error

Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// store.sp
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(4) : warning 207: unknown #pragma
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(4) : error 038: extra characters on line
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(11) : error 001: expected token: "}", but found "-identifier-"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(14) : error 010: invalid function or declaration
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(18) : error 092: number of arguments does not match definition
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(33) : error 036: empty statement
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(36) : warning 217: loose indentation
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(36) : error 029: invalid expression, assumed zero
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(41) : warning 217: loose indentation
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(42) : error 017: undefined symbol "manu"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(48) : error 017: undefined symbol "CreateEntityByName"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(50) : error 017: undefined symbol "DispatchSpawn"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(52) : error 017: undefined symbol "DispatchKeyValue"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(57) : warning 209: function "SpawnEntity" should return a value
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : error 017: undefined symbol "Credits"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : warning 215: expression has no effect
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : error 001: expected token: ";", but found "]"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : error 029: invalid expression, assumed zero
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : fatal error 127: too many error messages on one line
//
// Compilation aborted.
// 14 Errors.
//
// Compilation Time: 0.42 sec
// ----------------------------------------

Press enter to exit ...
FoxyTheDeveloper is offline
FoxyTheDeveloper
Junior Member
Join Date: Jun 2020
Old 06-03-2020 , 09:07   Re: help Me To Fix My Store Plugin
Reply With Quote #4

Quote:
Originally Posted by mrtn View Post
How can we fix it if we do not know what is wrong?
i got this error when im trying to compile

Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// store.sp
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(4) : warning 207: unknown #pragma
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(4) : error 038: extra characters on line
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(11) : error 001: expected token: "}", but found "-identifier-"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(14) : error 010: invalid function or declaration
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(18) : error 092: number of arguments does not match definition
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(33) : error 036: empty statement
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(36) : warning 217: loose indentation
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(36) : error 029: invalid expression, assumed zero
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(41) : warning 217: loose indentation
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(42) : error 017: undefined symbol "manu"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(48) : error 017: undefined symbol "CreateEntityByName"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(50) : error 017: undefined symbol "DispatchSpawn"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(52) : error 017: undefined symbol "DispatchKeyValue"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(57) : warning 209: function "SpawnEntity" should return a value
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : error 017: undefined symbol "Credits"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : warning 215: expression has no effect
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : error 001: expected token: ";", but found "]"
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : error 029: invalid expression, assumed zero
// L:\downloads\mo\Fun\csgo\addons\sourcemod\scripting\store.sp(62) : fatal error 127: too many error messages on one line
//
// Compilation aborted.
// 14 Errors.
//
// Compilation Time: 0.42 sec
// ----------------------------------------

Press enter to exit ...
FoxyTheDeveloper is offline
mrtn
Junior Member
Join Date: May 2020
Old 06-04-2020 , 09:02   Re: help Me To Fix My Store Plugin
Reply With Quote #5

You're compiling with an incompatible compiler. This script also uses the old Sourcemod syntax (pre Transitional API introduced in 1.7)

Either update your compiler to match the script, or update the script to match the compiler
mrtn is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode