Raised This Month: $ Target: $400
 0% 

I'll reference your memory in a minute!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rompom7
Senior Member
Join Date: May 2004
Old 06-09-2004 , 03:15   I'll reference your memory in a minute!
Reply With Quote #1

Hello, I am working on a plugin but when ever I try to compile it I get an error in the command window

Quote:
The instruction at 0x0041c40a referenced memory at 0x00000008.
The memory could not be read.
It puts the .amx file in the compiled folder but it is an empty file (0kb).

Is this some kind of newb scripting effort? Or is it something wrong with the compiler.

I attached that .sma, like I said, i am a newb at this so don't laugh
Attached Files
File Type: sma Get Plugin or Get Source (warbot.sma - 288 views - 1.8 KB)
__________________
Forgive your enimies, but never forget their name.
rompom7 is offline
Send a message via MSN to rompom7
BAILOPAN
Join Date: Jan 2004
Old 06-09-2004 , 04:27  
Reply With Quote #2

1: The compiler shouldn't crash, looks like a bug :] (00000008 is invalid memory).

You can't do things like this:
Code:
textid("[WarBot] Changed your name to " + name + " [L]",id)

String addition doesn't work because they are character arrays. It must be this:
Code:
new temp[128] format(temp, 128, "[Warbot] Changed your name to %s [L]", name) textid(temp, id)

Also, unless you reference your helper functions in other places like this:
set_task(... "textid"...) or register_event(..."textid") etc
They shouldn't be public.
__________________
egg
BAILOPAN is offline
rompom7
Senior Member
Join Date: May 2004
Old 06-09-2004 , 04:36  
Reply With Quote #3

Thanks for your help BAILOPAN. I did string addition because of my old pascal days

and yes I am going to use the set_task function, but thanks anyway
__________________
Forgive your enimies, but never forget their name.
rompom7 is offline
Send a message via MSN to rompom7
[FBX]
Senior Member
Join Date: May 2004
Old 06-09-2004 , 06:41  
Reply With Quote #4

adding a string class would be rather handy...
[FBX] is offline
BAILOPAN
Join Date: Jan 2004
Old 06-09-2004 , 06:57  
Reply With Quote #5

Adding random things like this into a language set is no easy task. While we have thought of making a string tag and attaching properties to it, it would be a separate "string engine" and we'd need to run a separate (or the given) garbage collector for AMX (I think).

Maybe for HL2 ;]
__________________
egg
BAILOPAN is offline
rompom7
Senior Member
Join Date: May 2004
Old 06-09-2004 , 07:24  
Reply With Quote #6

Woah. I hadn't even thought about AMX-X for HL2.
__________________
Forgive your enimies, but never forget their name.
rompom7 is offline
Send a message via MSN to rompom7
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 14:41.


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